Skip to content

Commit f39cb27

Browse files
committed
allow items to be forcefully re-updated by a manual action trigger
1 parent e96bacb commit f39cb27

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/update-items.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
workflows: ["Update Hashes"]
66
types:
77
- completed
8+
workflow_dispatch:
89

910
jobs:
1011
check-items:
@@ -21,8 +22,11 @@ jobs:
2122
- name: Check if item files changed
2223
id: file_check
2324
run: |
24-
if git diff --name-only ${{ github.event.workflow_run.head_sha }}^ ${{ github.event.workflow_run.head_sha }} \
25-
| grep -Eq '^(finders/items/data/item.txt|finders/items/data/id.txt|finders/items/items-imgs.zip)$'; then
25+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
26+
echo "Manual run detected."
27+
echo "changed=true" >> $GITHUB_OUTPUT
28+
elif git diff --name-only ${{ github.event.workflow_run.head_sha }}^ ${{ github.event.workflow_run.head_sha }} \
29+
| grep -Eq '^(finders/items/data/item.txt|finders/items/data/id.txt|finders/items/items-imgs.zip)$'; then
2630
echo "changed=true" >> $GITHUB_OUTPUT
2731
else
2832
echo "changed=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)