From 2139c269f313658715a4a171d3b25133ab28886f Mon Sep 17 00:00:00 2001 From: Isuru Wijesiri Date: Thu, 2 Nov 2023 10:35:54 +0530 Subject: [PATCH] Add initial workflow for transaction counter release --- .github/workflows/counter-release.yml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/counter-release.yml diff --git a/.github/workflows/counter-release.yml b/.github/workflows/counter-release.yml new file mode 100644 index 0000000..093bdb5 --- /dev/null +++ b/.github/workflows/counter-release.yml @@ -0,0 +1,56 @@ +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 + + - uses: mr-smithers-excellent/docker-build-push@v6 + name: Build & push Docker image + with: + image: isurumaduranga/wso2-transaction-counter-service + registry: docker.io + dockerfile: service/target/docker/Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + +