ci: fix YAML indentation and use toLower() for GHCR owner #3
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: Release Docker Images | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to GHCR | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Extract version | ||
| id: vars | ||
| shell: bash | ||
| run: | | ||
| TAG=${GITHUB_REF_NAME} | ||
| echo "version=${TAG#v}" >> $GITHUB_OUTPUT | ||
| echo "tag=${TAG}" >> $GITHUB_OUTPUT | ||
| - name: Build and push API image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: tweetpulse-pipeline/Dockerfile.api | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-api:latest | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-api:${{ steps.vars.outputs.version }} | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-api:${{ steps.vars.outputs.tag }} | ||
| - name: Build and push Producer image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: tweetpulse-pipeline/Dockerfile.producer | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-producer:latest | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-producer:${{ steps.vars.outputs.version }} | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-producer:${{ steps.vars.outputs.tag }} | ||
| - name: Build and push Consumer image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: tweetpulse-pipeline/Dockerfile.consumer | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-consumer:latest | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-consumer:${{ steps.vars.outputs.version }} | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-consumer:${{ steps.vars.outputs.tag }} | ||
| - name: Build and push Dashboard image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: tweetpulse-dashboard/Dockerfile.dashboard | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:latest | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:${{ steps.vars.outputs.version }} | ||
| ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:${{ steps.vars.outputs.tag }} | ||