Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
with:
images: test
- name: Cache var-cache-apt
id: cache-var-cache-apt
uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('.github/workflows/test/Dockerfile') }}
- name: Cache var-lib-apt
id: cache-var-lib-apt
uses: actions/cache@v3
with:
path: var-lib-apt
Expand All @@ -34,6 +36,7 @@ jobs:
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
skip-extraction: ${{ steps.cache-var-lib-apt.outputs.cache-hit }}
- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
scratch-dir:
default: scratch
description: "Where the action is stores some temporary files for its processing. Default: `scratch`"
skip-extraction:
default: "false"
description: "Skip the extraction of the cache from the docker container"
runs:
using: 'node20'
main: 'entrypoint.js'
Expand Down
6 changes: 6 additions & 0 deletions post
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ dir="$(dirname "$0")"
read_action_input() {
"${dir}/read-action-input" "$1"
}

if [ "$(read_action_input skip-extraction)" == "true" ]; then
echo "skip-extraction is set. Skipping extraction step..." >&2
exit 0
fi

: "Prepare Timestamp for Layer Cache Busting"
date --iso=ns | tee "$(read_action_input scratch-dir)"/buildstamp
: "Prepare Dancefile to Access Caches"
Expand Down