Try to skip successful jobs on rerun workflow

This commit is contained in:
abejgonzalez
2021-10-07 20:05:43 -07:00
parent 26d1731bd9
commit f117f7a0fe
3 changed files with 319 additions and 2 deletions

8
.github/actions/job-end/action.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
name: job-end
description: "Save a job status"
runs:
using: "composite"
steps:
- run: echo "success" > run_result
shell: bash

19
.github/actions/job-start/action.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: job-start
description: "Setup a job status"
outputs:
run_result:
value: ${{ steps.run_result.outputs.run_result }}
runs:
using: "composite"
steps:
- name: Restore the previous run result
uses: actions/cache@v2
with:
path: run_result
key: ${{ github.run_id }}-${{ github.job }}
restore-keys: ${{ github.run_id }}-${{ github.job }}
- name: Set run_result to default or use cached value
id: run_result
run: echo "::set-output name=run_result::$(cat run_result 2>/dev/null || echo 'default')"
shell: bash

File diff suppressed because it is too large Load Diff