build on merge #3
Workflow file for this run
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
# A github action that builds a container image for the project. | ||
name: Build Container | ||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
# This is the entire list of files that will trigger the workflow. | ||
- Dockerfile | ||
- pyproject.toml | ||
- requirements-gpu.txt | ||
- .github/workflows/build-container.yaml | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
# This is the name of the image that will be pushed to Docker Hub. If the branch is main, the image will be tagged as latest. Else, it will be tagged as the branch name. | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/taxpose:${{ github.ref == 'refs/heads/main' && 'latest' || replace(github.ref, 'refs/heads/', '') }} | ||
Check failure on line 34 in .github/workflows/build-container.yaml GitHub Actions / Build ContainerInvalid workflow file
|