Skip to content
Open
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
41 changes: 41 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Action
on:
push:
pull_request:

jobs:
test-action:
name: Test Action
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create cache
uses: buildjet/cache/save@v4
with:
path: src/*
key: test-action-${{ github.run_id }}-${{ github.run_attempt }}
- name: Check key found
uses: buildjet/cache/restore@v4
with:
path: src/*
key: test-action-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true
lookup-only: true
- name: Delete cache
uses: ./ # Uses an action in the root directory
with:
cache_key: test-action-${{ github.run_id }}-${{ github.run_attempt }}
- name: Check key not found (1/2)
uses: buildjet/cache/restore@v4
id: check
with:
path: src/*
key: test-action-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: false
lookup-only: true
- name: Check key not found (2/2)
run: |
if [ "${{ steps.check.outputs.cache-hit }}" == "true" ]; then
exit 1
fi