-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
51 lines (51 loc) · 1.72 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'last-successful-build-action'
description: 'Action to find the sha of the last successful workflow of a branch.'
branding:
icon: rewind
color: blue
inputs:
clean:
description: 'Determine if checkout should be cleaned'
default: true
required: false
relative_checkout_directory:
description: 'The relative checkout directory in terms of the runner/repository workspace'
required: true
token:
description: 'GITHUB_TOKEN or a repo scoped PAT.'
default: ${{ github.token }}
required: false
branch:
description: 'Branch for the workflow to look for.'
default: ${{ github.head_ref || github.ref_name }}
required: false
verify:
description: 'Verify SHA of workflow run commit against list of commit SHAs in repository. Add verify if workflow is expected to contain commits that no longer exist (rebased commit history)'
required: false
default: 'false'
workflow:
description: 'Current workflow name'
default: ${{ github.workflow }}
required: false
outputs:
sha:
description: 'Sha of the workflow-run matching the requirements.'
value: ${{ steps.lastrun.outputs.sha }}
run-id:
description: 'Id of the workflow-run matching the requirements.'
value: ${{ steps.lastrun.outputs.run-id }}
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
clean: ${{ inputs.clean }}
path: ${{ inputs.relative_checkout_directory }}
- id: lastrun
name: Get latest successful sha
uses: VeoVirt/last-successful-build-action@v7
with:
token: "${{ inputs.token }}"
branch: ${{ inputs.branch }}
workflow: "${{ inputs.workflow }}"
verify: ${{ inputs.verify }}$