diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca8b8c8..715afb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,4 +16,9 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: cs50/check:${{ github.sha }},cs50/check:latest + build-args: | + TAG=${{ github.ref == 'refs/heads/main' && 'latest' || 'canary' }} + tags: | + cs50/check:${{ github.sha }} + cs50/check:canary + ${{ github.ref == 'refs/heads/main' && 'cs50/check:latest' || '' }} diff --git a/Dockerfile b/Dockerfile index 1aebd34..1a55694 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM cs50/cli +ARG TAG=latest +FROM cs50/cli:${TAG} USER root