Skip to content

docker experience seems to work #43

docker experience seems to work

docker experience seems to work #43

# A github action that builds a container image for the project.
name: Build Container
on:
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
paths:
# This is the entire list of files that will trigger the workflow.
- Dockerfile
- pyproject.toml
- requirements-gpu.txt
- .github/workflows/build-container.yaml
- .github/workflows/compute-tag.yaml
jobs:
compute_tag:
uses: ./.github/workflows/compute-tag.yaml
docker:
runs-on: ubuntu-latest
needs: compute_tag
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:${{ needs.compute_tag.outputs.image_tag }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/taxpose:${{ needs.compute_tag.outputs.image_tag }}
cache-to: type=inline