Skip to content

Commit

Permalink
[ci skip] Try to cache successful jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
abejgonzalez committed Oct 8, 2021
1 parent 26d1731 commit a34b4c9
Show file tree
Hide file tree
Showing 3 changed files with 1,102 additions and 1,075 deletions.
7 changes: 7 additions & 0 deletions .github/actions/job-end/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: job-end
description: "Save a job status"

runs:
using: "composite"
steps:
- run: echo "::set-output name=run_result::success" > run_result
16 changes: 16 additions & 0 deletions .github/actions/job-start/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: job-start
description: "Setup a job status"

runs:
using: "composite"
steps:
- id: timestamp
run: echo "::set-output name=timestamp::$(timestamp +%s)"
- name: Restore the previous run result
uses: actions/cache@v2
with:
path: run_result
key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: ${{ github.run_id }}-${{ github.job }}-
- id: run_result
run: cat run_result 2>/dev/null || echo 'default'
Loading

0 comments on commit a34b4c9

Please sign in to comment.