Repository navigation
Expand file tree
/
Copy pathissue_helper_update_version.yml
More file actions
141 lines (129 loc) · 5.87 KB
/
Copy pathissue_helper_update_version.yml
File metadata and controls
141 lines (129 loc) · 5.87 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: 'Issue Helper Outdated Version'
on:
workflow_dispatch:
inputs:
item_id:
description: 'Item ID'
type: string
required: true
more_info:
description: 'More Info'
type: string
show_more_info:
description: 'Show More Info Entry'
type: choice
options:
- 'No'
- 'Yes'
type_more_info:
description: 'More Info Type'
type: choice
options:
- 'Note'
- 'Caution'
permissions:
issues: write
concurrency:
group: lock
jobs:
issue_outdated_version1:
name: Issue - Outdated - Version1
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.inputs.item_id }}
MORE_INFO: ${{ github.event.inputs.more_info }}
steps:
# Generate App Token
- id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
# Get latest release tag
- id: part_2_1a
uses: oprypin/find-latest-tag@v1
with:
repository: ${{ github.repository }}
token: ${{ steps.app-token.outputs.token }}
releases-only: true
# ── Comment Variants ──────────────────────────────────────────
- name: Create comment (more_info=Yes, note)
if: |
github.event.inputs.show_more_info == 'Yes' &&
github.event.inputs.type_more_info == 'Note'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TAG: ${{ steps.part_2_1a.outputs.tag }}
run: |
{
echo 'You appear to be running an outdated and/or unsupported version of RefindPlus.'
echo 'Run the current release version, or an unmodified build as appropriate, and update this thread accordingly.'
echo ""
echo "The current release version is **${TAG}**."
echo 'You can get a copy of the current release version [HERE](https://github.com/RefindPlusRepo/RefindPlus/releases).'
echo ""
echo 'Refer to [BUILDING.md](https://github.com/RefindPlusRepo/RefindPlus/blob/GOPFix/BUILDING.md) for how to build RefindPlus.'
echo 'NB: Use the `Remote GitHub Build Option` to obtain a verifiably unmodified build'
echo ""
echo "> [!NOTE]"
echo "> ${MORE_INFO}"
echo ""
echo "> [!IMPORTANT]"
echo "> Please add debug logging from the new run to the thread update if the issue remains."
} > /tmp/comment-body.md
gh issue comment "$ISSUE_NUMBER" --body-file /tmp/comment-body.md
- name: Create comment (more_info=Yes, caution)
if: |
github.event.inputs.show_more_info == 'Yes' &&
github.event.inputs.type_more_info == 'Caution'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TAG: ${{ steps.part_2_1a.outputs.tag }}
run: |
{
echo 'You appear to be running an outdated and/or unsupported version of RefindPlus.'
echo 'Run the current release version, or an unmodified build as appropriate, and update this thread accordingly.'
echo ""
echo "The current release version is **${TAG}**."
echo 'You can get a copy of the current release version [HERE](https://github.com/RefindPlusRepo/RefindPlus/releases).'
echo ""
echo 'Refer to [BUILDING.md](https://github.com/RefindPlusRepo/RefindPlus/blob/GOPFix/BUILDING.md) for how to build RefindPlus.'
echo 'NB: Use the `Remote GitHub Build Option` to obtain a verifiably unmodified build'
echo ""
echo "> [!CAUTION]"
echo "> ${MORE_INFO}"
echo ""
echo "> [!IMPORTANT]"
echo "> Please add debug logging from the new run to the thread update if the issue remains."
} > /tmp/comment-body.md
gh issue comment "$ISSUE_NUMBER" --body-file /tmp/comment-body.md
- name: Create comment (more_info=No)
if: ${{ github.event.inputs.show_more_info == 'No' }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TAG: ${{ steps.part_2_1a.outputs.tag }}
run: |
{
echo 'You appear to be running an outdated and/or unsupported version of RefindPlus.'
echo 'Run the current release version, or an unmodified build as appropriate, and update this thread accordingly.'
echo ""
echo "The current release version is **${TAG}**."
echo 'You can get a copy of the current release version [HERE](https://github.com/RefindPlusRepo/RefindPlus/releases).'
echo ""
echo 'Refer to [BUILDING.md](https://github.com/RefindPlusRepo/RefindPlus/blob/GOPFix/BUILDING.md) for how to build RefindPlus.'
echo 'NB: Use the `Remote GitHub Build Option` to obtain a verifiably unmodified build'
echo ""
echo "> [!IMPORTANT]"
echo "> Please add debug logging from the new run to the thread update if the issue remains."
} > /tmp/comment-body.md
gh issue comment "$ISSUE_NUMBER" --body-file /tmp/comment-body.md
# ── Label Management ──────────────────────────────────────────
- name: Add Queries label
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh issue edit "$ISSUE_NUMBER" --add-label 'Queries'
- name: Remove unwanted labels
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh issue edit "$ISSUE_NUMBER" --remove-label 'Triage,Noted,No-Log,Queries,Parked,Prorogued,Unclear,Uncertain,Unresolved,Confirmed,Bug'