ops: hashFiles workaround
https://docs.gitea.com/next/usage/actions/comparison#hashfiles-expression
This commit is contained in:
@@ -19,13 +19,19 @@ jobs:
|
||||
-
|
||||
name: Create docker cache folder
|
||||
run: mkdir -p /tmp/docker
|
||||
-
|
||||
name: Hash dockerfile
|
||||
id: dockerfile-hash
|
||||
uses: actions/go-hashfiles@v0.0.1
|
||||
with:
|
||||
patterns: builder.Dockerfile
|
||||
-
|
||||
name: Restore docker image
|
||||
id: cache-docker
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/docker
|
||||
key: ${{ runner.os }}-docker-${{ hashFiles('builder.Dockerfile') }}
|
||||
key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
||||
-
|
||||
name: Build docker builder-image
|
||||
if: steps.cache-docker.outputs.cache-hit != 'true'
|
||||
@@ -42,13 +48,19 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Hash dockerfile
|
||||
id: dockerfile-hash
|
||||
uses: actions/go-hashfiles@v0.0.1
|
||||
with:
|
||||
patterns: builder.Dockerfile
|
||||
-
|
||||
name: Restore docker image
|
||||
id: cache-docker
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/docker
|
||||
key: ${{ runner.os }}-docker-${{ hashFiles('builder.Dockerfile') }}
|
||||
key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
||||
-
|
||||
name: Load image
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user