Fix workflow

This commit is contained in:
clsty
2025-10-09 23:12:49 +08:00
parent 0a7c549125
commit 582fffda1b
2 changed files with 13 additions and 8 deletions
+11 -7
View File
@@ -4,8 +4,7 @@ on:
push:
paths:
- 'dist-arch/**'
- '.github/workflows/**'
workflow_dispatch:
# workflow_dispatch:
jobs:
comment_on_discussion:
@@ -14,20 +13,25 @@ jobs:
- name: Create comment on discussion #2140
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCUSSION_NUMBER: 2140
# https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment
run: |
MESSAGE="**Auto notification:**\n"
MESSAGE="Directory \`dist-arch\` has been updated.\n"
MESSAGE+="Commit HASH: ${{ github.sha }}\n"
MESSAGE+="Commit message: ${{ github.event.head_commit.message }}\n"
DISCUSSION_NODE_ID=$(gh api graphql -f query='
query {
repository( owner: "end-4", name: "dots-hyprland" )
{ discussion(number: 2140) { id } }
repository( owner: "${{ github.repository.owner }}", name: "${{ github.repository.name }}" )
{ discussion(number: '${DISCUSSION_NUMBER}') { id } }
}' | \
jq -r '.data.repository.discussion.id')
echo "The value of DISCUSSION_NODE_ID is ${DISCUSSION_NODE_ID}."
gh api graphql -f query='
mutation {
addDiscussionComment(input:{
discussionId: "$DISCUSSION_NODE_ID",
body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}.",
discussionId: "'$DISCUSSION_NODE_ID'",
body: "'$MESSAGE'",
}) {
clientMutationId
comment {
+1
View File
@@ -1,4 +1,5 @@
# Install scripts for Arch Linux
## Old Dependency Installation Method
The old deps install method mainly involved `./scriptdata/dependencies.conf` (which has been removed now).