This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
94 lines (88 loc) · 2.94 KB
/
action.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Start GitHub Actions job with gha-trigger
description: Start GitHub Actions job with gha-trigger
inputs:
data:
description: gha-trigger's workflow dispatch input
required: true
app_id:
description: GitHub App ID
required: true
app_private_key:
description: GitHub App Private Key
required: true
main_repo_checkout_fetch_depth:
description: Main Repository's checkout fetch depth
default: 1
required: false
main_repo_checkout_lfs:
description: Main Repository's checkout lfs
default: false
required: false
main_repo_checkout_submodules:
description: Main Repository's checkout submodules
default: false
required: false
enable_ci_repo_checkout:
description: If true, CI Repository is checked out
default: true
required: false
ci_repo_checkout_path:
description: CI Repository's checkout path
default: .ci
required: false
ci_repo_checkout_ref:
description: CI Repository's checkout ref
default: ""
required: false
ci_repo_checkout_fetch_depth:
description: CI Repository's checkout fetch depth
default: 1
required: false
ci_repo_checkout_lfs:
description: CI Repository's checkout lfs
default: false
required: false
ci_repo_checkout_submodules:
description: CI Repository's checkout submodules
default: false
required: false
start_workflow:
description: Update a commit status
required: false
default: false
outputs:
github_app_token:
description: GitHub App's Access Token
value: ${{steps.generate_token.outputs.token}}
runs:
using: composite
steps:
- uses: gha-trigger/set-env-action@94b9fe58e9342e2e723becba74769142a7cb281e # v0.1.3
with:
data: ${{inputs.data}}
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # v1
with:
app_id: ${{inputs.app_id}}
private_key: ${{inputs.app_private_key}}
- uses: gha-trigger/commit-status-action@23db2bd759383bae73461ccfac2d3508a26de9e1 # v0.1.1
with:
github_token: ${{steps.generate_token.outputs.token}}
start_workflow: ${{inputs.start_workflow}}
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
repository: ${{env.GHA_REPOSITORY}}
ref: ${{env.GHA_SHA}}
token: ${{steps.generate_token.outputs.token}}
fetch-depth: ${{inputs.main_repo_checkout_fetch_depth}}
lfs: ${{inputs.main_repo_checkout_lfs}}
submodules: ${{inputs.main_repo_checkout_submodules}}
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
if: inputs.enable_ci_repo_checkout
with:
path: ${{inputs.ci_repo_checkout_path}}
ref: ${{inputs.ci_repo_checkout_ref}}
fetch-depth: ${{inputs.ci_repo_checkout_fetch_depth}}
lfs: ${{inputs.ci_repo_checkout_lfs}}
submodules: ${{inputs.ci_repo_checkout_submodules}}