forked from wso2/integration-transaction-counter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for transaction counting service release
- Loading branch information
1 parent
3c1529b
commit 6977195
Showing
3 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release Transaction Counting Service | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 ballerina service | ||
working-directory: ./service | ||
run: bal build | ||
- name: Read the version from Ballerina.toml | ||
uses: SebRollen/toml-action@v1.0.2 | ||
id: read_toml | ||
with: | ||
file: 'service/Ballerina.toml' | ||
field: 'package.version' | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Push docker Image to Docker Hub | ||
run: | | ||
docker push ${{ secrets.DOCKER_USERNAME }}/transaction-counting-service:latest | ||
docker tag ${{ secrets.DOCKER_USERNAME }}/transaction-counting-service:latest ${{ secrets.DOCKER_USERNAME }}/transaction-counting-service:${{ steps.read_toml.outputs.value }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/transaction-counting-service:${{ steps.read_toml.outputs.value }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ distribution = "2201.7.0" | |
|
||
[build-options] | ||
observabilityIncluded = true | ||
cloud = "k8s" | ||
cloud = "docker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
[container.image] | ||
repository="wso2inc" | ||
repository="isurumaduranga" | ||
name="transaction-counting-service" | ||
tag="v0.1.0-SNAPSHOT" | ||
|
||
[settings] | ||
buildImage=false | ||
tag="latest" |