-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaction.yml
41 lines (40 loc) · 1.58 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
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
name: "Clean custom"
description: "Custom clean step to run after PR is closed"
# this inputs are always provided by flowzone, so they must always be defined on the composite action
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
required: true
runs:
using: "composite"
steps:
- name: Dump context
shell: bash
env:
GITHUB: ${{ toJSON(github) }}
INPUTS: ${{ inputs.json }}
SECRETS: ${{ inputs.secrets }}
VARIABLES: ${{ toJSON(inputs.variables) }}
run: |
echo "${GITHUB}"
echo "${INPUTS}"
echo "${SECRETS}"
echo "${VARIABLES}"
# https://github.com/marketplace/actions/github-app-token
- name: Generate GitHub App installation token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
if: ${{ fromJSON(inputs.json).app_id }}
id: gh_app_installation_token
with:
app_id: ${{ fromJSON(inputs.json).app_id }}
installation_retrieval_mode: organization
installation_retrieval_payload: ${{ github.repository_owner }}
private_key: ${{ fromJSON(inputs.secrets).GH_APP_PRIVATE_KEY }}
permissions: ${{ fromJSON(inputs.json).token_scope }}