feat: add cache demo
This commit is contained in:
parent
c073eb8cda
commit
7530e77399
1 changed files with 18 additions and 0 deletions
18
.forgejo/workflows/cache_demo.yaml
Normal file
18
.forgejo/workflows/cache_demo.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Caching Primes
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Cache Primes
|
||||||
|
id: cache-primes
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: prime-numbers
|
||||||
|
key: ${{ runner.os }}-primes
|
||||||
|
- name: Generate Prime Numbers
|
||||||
|
if: steps.cache-primes.outputs.cache-hit != 'true'
|
||||||
|
run: /generate-primes.sh -d prime-numbers
|
||||||
|
- name: Use Prime Numbers
|
||||||
|
run: /primes.sh -d prime-numbers
|
Loading…
Add table
Reference in a new issue