Skip to content

Commit

Permalink
use branch-local tags to track latest
Browse files Browse the repository at this point in the history
  • Loading branch information
danmatichuk committed Mar 1, 2024
1 parent 8f269fb commit e527ce2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
jobs:
docker:
runs-on: self-hosted
env:
GITHUB_REF: ${{ vars.GITHUB_REF }}

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -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: |
Expand All @@ -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:
Expand Down

0 comments on commit e527ce2

Please sign in to comment.