Skip to content

Commit

Permalink
push buildcache before tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvpickering committed May 24, 2024
1 parent 91dbe29 commit 58a5791
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and export to Docker
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
Expand All @@ -38,6 +38,13 @@ jobs:
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}:buildcache
tags: ${{ env.DOCKERHUB_REPO }}:testing

# push cache that includes production and testing
- name: Push buildcache to DockerHub
uses: docker/build-push-action@v2
with:
context: .
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}:buildcache,mode=max

- name: Test pull request
if: github.event.pull_request.merged == false
run: |
Expand All @@ -52,11 +59,4 @@ jobs:
push: true
tags: ${{ env.DOCKERHUB_REPO }}:latest

# push cache that includes production and testing
- name: Push buildcache to DockerHub on merge
uses: docker/build-push-action@v2
if: github.event.pull_request.merged == true
with:
context: .
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}:buildcache,mode=max

0 comments on commit 58a5791

Please sign in to comment.