Merge pull request #1156 from credebl/hotfix/push-docker-image #2
Workflow file for this run
This file contains hidden or 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: Continuous Delivery | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-and-push: | |
| name: Push Docker image to GitHub | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| service: | |
| - agent-provisioning | |
| - agent-service | |
| - api-gateway | |
| - cloud-wallet | |
| - connection | |
| - geolocation | |
| - issuance | |
| - ledger | |
| - notification | |
| - user | |
| - utility | |
| - verification | |
| - webhook | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Extract Git Tag | |
| id: get_tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Push Docker Image ${{ matrix.service }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfiles/Dockerfile.${{ matrix.service }} | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:${{ env.TAG }} | |
| ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:latest |