-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
69 lines (69 loc) · 2.33 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
61
62
63
64
65
66
67
68
69
name: 'Conversational release action'
description: 'Release Quarkus by conversing with a GitHub Action'
inputs:
github-token:
description: 'GitHub token'
required: true
action:
description: 'Name of the action (if named)'
required: false
interaction-comment:
description: 'Optional interaction comment'
required: false
outputs:
branch:
value: ${{ steps.action.outputs.branch }}
qualifier:
value: ${{ steps.action.outputs.qualifier }}
major:
value: ${{ steps.action.outputs.major }}
version:
value: ${{ steps.action.outputs.version }}
jdk:
value: ${{ steps.action.outputs.jdk }}
origin-branch:
value: ${{ steps.action.outputs.origin-branch }}
status:
value: ${{ steps.action.outputs.status }}
current-step:
value: ${{ steps.action.outputs.current-step }}
current-step-status:
value: ${{ steps.action.outputs.current-step-status }}
workflow-run-id:
value: ${{ steps.action.outputs.workflow-run-id }}
interaction-comment:
value: ${{ steps.action.outputs.interaction-comment }}
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
- name: Set up JBang
uses: jbangdev/setup-jbang@main
- name: Run the action
id: action
run: jbang --java 21 --fresh --repos 'quarkus-github-action=https://maven.pkg.github.com/quarkusio/conversational-release-action/' --repos 'mavencentral' io.quarkus.bot:conversational-release-action:999-SNAPSHOT
shell: bash
env:
JSON_INPUTS: ${{ toJSON(inputs) }}
GITHUB_TOKEN: ${{ inputs.github-token }}