Merge pull request #1426 from finos/renovate/workflows-manager #46
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: Build and Publish Docker Image | |
| on: | |
| push: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| docker-build-publish: | |
| name: Build and Publish Docker Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - name: Checkout Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Log in to Docker Hub | |
| if: github.repository == 'finos/git-proxy' | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| username: finos | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set Docker Image Tag | |
| id: tags | |
| run: | | |
| if [ "${{ github.event_name }}" = "release" ]; then | |
| echo "tags=finos/git-proxy:${{ github.ref_name }},finos/git-proxy:latest" >> $GITHUB_OUTPUT | |
| else | |
| echo "tags=finos/git-proxy:main" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build and Publish Docker Image | |
| if: github.repository == 'finos/git-proxy' | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: ${{ steps.tags.outputs.tags }} | |
| provenance: true |