added target cache
This commit is contained in:
parent
ff4181ad5c
commit
7a738df1b0
|
@ -18,5 +18,19 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
- name: Get access token from secret
|
||||
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
|
||||
- name: Restore cached target
|
||||
id: cache-primes-restore
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: |
|
||||
target/
|
||||
key: ${{ runner.os }}-primes
|
||||
- name: Run tests on docker
|
||||
run: docker compose down -v && docker compose run bot t
|
||||
run: docker compose down -v && docker compose run bot t
|
||||
- name: Save target
|
||||
id: cache-primes-save
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: |
|
||||
target/
|
||||
key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }}
|
|
@ -42,6 +42,13 @@ jobs:
|
|||
registry: git.fai.st
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Restore cached target
|
||||
id: cache-primes-restore
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: |
|
||||
target/
|
||||
key: ${{ runner.os }}-primes
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
|
@ -49,4 +56,11 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Save target
|
||||
id: cache-primes-save
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: |
|
||||
target/
|
||||
key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }}
|
Loading…
Reference in New Issue