From 5c6667fedc64353b56d3d3c9c8ca03c62aad7977 Mon Sep 17 00:00:00 2001 From: Daniel Matichuk Date: Thu, 29 Feb 2024 23:44:55 -0800 Subject: [PATCH] use branch-local tags to track latest --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 257c534b..f96d2e8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,9 @@ on: jobs: docker: runs-on: self-hosted + env: + GITHUB_REF: ${{ vars.GITHUB_REF }} + steps: - uses: actions/checkout@v2 with: @@ -36,7 +39,7 @@ jobs: # Pulls the latest image to try to re-use some layers - name: Pull Latest Docker image run: | - docker pull artifactory.galois.com:5025/pate/pate:latest || echo "No latest image found" + docker pull artifactory.galois.com:5025/pate/pate-$GITHUB_REF:latest || echo "No latest image found" - name: Build Docker Image run: | @@ -51,6 +54,7 @@ jobs: run: | CI_COMMIT_SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) docker tag pate artifactory.galois.com:5025/pate/pate:$CI_COMMIT_SHORT_SHA + docker tag pate artifactory.galois.com:5025/pate/pate-$GITHUB_REF:latest docker push artifactory.galois.com:5025/pate/pate:$CI_COMMIT_SHORT_SHA build: