Github Actions workflow credential fix #11
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 Jurre Brishti cGAN Models Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - configs/** | |
| - .github/workflows/build-jurre-brishti.yaml | |
| - jobs.Dockerfile | |
| - README.md | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cancel Previous Workflow | |
| uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set docker image meta attributes | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ secrets.DOCKERHUB_USERNAME }}/jurre-brishti-pipeline | |
| tags: | | |
| ${{ secrets.GITHUB_SHA }} | |
| latest | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Checkout code from GitHub | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'main' | |
| - name: Build and push web proxy image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: jobs.Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: GAN_BRANCH=Jurre_brishti | |
| - name: Docker Hub Description | |
| uses: peter-evans/dockerhub-description@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: ${{ secrets.DOCKERHUB_USERNAME }}/jurre-brishti-pipeline | |
| short-description: Jurre Brishti cGAN model jobs service | |
| enable-url-completion: true | |
| - name: Logout of docker registry | |
| run: docker logout |