-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
64 lines (64 loc) · 2.18 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
name: Harold's Release Notifications
description: Post a message in Slack to say the deployment is initiated, create a release note, and post that note in Slack. Automates JIRA ticket status movement.
inputs:
git-token:
description: GitHub Personal Access Token used to checkout Harold
required: true
git-user:
description: GitHub user who initiated the action.
required: true
git-run-id:
description: GitHub Action Run id.
required: true
channel:
description: Slack channel that Harold posts in
required: true
uri:
description: URI to retrieve the sha of the releasing service
required: true
slack-token:
description: Slack authorization token
required: true
repo:
description: GitHub repository that is being released
required: true
jira-token:
description: JIRA authorization token
required: true
jira-user:
description: JIRA username
required: true
jira-uri:
description: JIRA uri
required: true
before-sha:
description: SHA of the previous version
required: true
release-sha:
description: SHA of the releasing version
required: true
failure-webhook:
description: The webhook to trigger if the deployment fails.
required: true
success-webhook:
description: The webhook to trigger if the deployment succeeds.
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
- run: |
git clone https://${{ inputs.git-token }}@github.com/oncarrot/harold.git --depth 5
cd harold
git checkout tags/v0.3.5
gem build harold.gemspec
gem install harold
cd ..
harold sing -G ${{ inputs.git-token }} -N ${{ inputs.git-user }} -i ${{ inputs.git-run-id }} -C ${{ inputs.channel }} -u ${{ inputs.uri }} -S ${{ inputs.slack-token }} -g "https://github.com/${{ inputs.repo }}" -T ${{ inputs.jira-token }} -U ${{ inputs.jira-user }} -J ${{ inputs.jira-uri }} -b ${{ inputs.before-sha }} -r ${{ inputs.release-sha }} -f ${{ inputs.failure-webhook }} -s ${{ inputs.success-webhook }}
shell: bash