-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
60 lines (59 loc) · 2.14 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
52
53
54
55
56
57
58
59
60
name: 'Report status in issue'
description: 'Report status of a workflow run into a GitHub issue'
inputs:
github-token:
description: 'GitHub token'
required: true
action:
description: 'Name of the action (if named)'
required: false
status:
description: 'Status of the CI run'
required: true
issue-repository:
description: 'The repository where the issue resides (e.g. quarkusio/quarkus)'
required: true
issue-number:
description: 'The issue to update'
required: true
repository:
description: 'The repository for which we are reporting the CI status (by default, the repository running the action)'
required: false
run-id:
description: 'The ID of the Github Action run for which we are reporting the CI status (by default, the run id of the current run)'
required: false
runs:
using: "composite"
steps:
- name: Inject quarkus-github-action repository credentials
shell: bash
run: |
if [ -f ~/.m2/settings.xml ]; then
if ! grep -q '<id>quarkus-github-action</id>' ~/.m2/settings.xml; then
sed -i.bak 's@</servers>@<server><id>quarkus-github-action</id><username>${env.GITHUB_ACTOR}</username><password>${env.GITHUB_TOKEN}</password></server></servers>@' ~/.m2/settings.xml
fi
else
mkdir -p ~/.m2/
cat <<\EOF > ~/.m2/settings.xml
<?xml version="1.0"?>
<settings>
<servers>
<server>
<id>quarkus-github-action</id>
<username>${env.GITHUB_ACTOR}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>
EOF
fi
cat ~/.m2/settings.xml
- name: Set up JBang
uses: jbangdev/setup-jbang@main
- name: Run the action
id: action
run: jbang --verbose --java 21 --fresh --repos 'quarkus-github-action=https://maven.pkg.github.com/quarkusio/report-status-in-issue/' --repos 'mavencentral' io.quarkus.bot:report-status-in-issue:999-SNAPSHOT
shell: bash
env:
JSON_INPUTS: ${{ toJSON(inputs) }}
GITHUB_TOKEN: ${{ inputs.github-token }}