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: