Skip to content

Commit

Permalink
Add initial workflow for transaction counter release
Browse files Browse the repository at this point in the history
  • Loading branch information
IsuruMaduranga committed Nov 28, 2023
1 parent 3c1529b commit 61a036c
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/counter-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release Transaction Counter Plugin
on:
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: "Release Version"
next_version:
type: string
description: "Next Development Version"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Cache Ballerina.
uses: actions/cache@v3
id: cache
with:
path: "ballerina-dist/*.deb"
key: "ballerina-2201.8.0"
- name: Download Ballerina distribution.
shell: sh
run: |
mkdir -p ballerina-dist
wget 'https://dist.ballerina.io/downloads/2201.8.0/ballerina-2201.8.0-swan-lake-linux-x64.deb' -P ballerina-dist
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Ballerina distribution.
shell: sh
run: "sudo dpkg -i ballerina-dist/ballerina-2201.8.0-swan-lake-linux-x64.deb"
- name: Verify Ballerina Version
shell: sh
run: "bal -v"

- name: Checkout code
uses: actions/checkout@v4
- name: Build with Maven
run: mvn clean install -DskipTests=true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build & push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/transaction-counter-service:${{ github.event.inputs.release_version }}, ${{ secrets.DOCKER_USERNAME }}/transaction-counter-service:latest
file: service/target/docker/TransactionCountingService/Dockerfile

0 comments on commit 61a036c

Please sign in to comment.