From e527ce2e1c4b6a2d0b8550be8954b2706b315012 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 2e157968..a50bd057 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: | @@ -52,6 +55,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: