Add CI pipeline to the repo #1
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
name: CI workflow | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to the repository | |
uses: actions/checkout@v4 | |
- name: Set up Ballerina | |
uses: ballerina-platform/setup-ballerina@v1 | |
with: | |
version: 2201.9.2 | |
- name: Build application | |
run: bal build social_media | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Docker push | |
run: docker push wso2/social-media:0.0.1 |