Skip to content

Commit

Permalink
pull docker image before building
Browse files Browse the repository at this point in the history
  • Loading branch information
danmatichuk committed Mar 1, 2024
1 parent 9f61488 commit 2d47d0f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: CI Matrix
on:
pull_request:
push:
branches: [master, dwest/test-docker]
branches: [master, dm/test-docker]

jobs:
docker:
Expand All @@ -26,6 +26,18 @@ jobs:
git config --global url."https://".insteadOf "git://"
git submodule update --init
- name: Artifactory Login
uses: docker/login-action@v2
with:
registry: artifactory.galois.com:5025
username: ${{ secrets.ARTIFACTORY_USER }}
password: ${{ secrets.ARTIFACTORY_KEY }}

# 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
- name: Build Docker Image
run: |
docker build . -t pate
Expand All @@ -35,13 +47,6 @@ jobs:
docker run --rm -itd --entrypoint bash --name pate -v `pwd`/tests/aarch32:/tests pate
(echo "cabal run pate-test-aarch32 -- -p args-equal") | script -q /dev/null docker attach pate
- name: Artifactory Login
uses: docker/login-action@v2
with:
registry: artifactory.galois.com:5025
username: ${{ secrets.ARTIFACTORY_USER }}
password: ${{ secrets.ARTIFACTORY_KEY }}

- name: Push Docker image
run: |
CI_COMMIT_SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)
Expand Down

0 comments on commit 2d47d0f

Please sign in to comment.