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
+12 -8
View File
@@ -4,8 +4,7 @@ on:
push: push:
paths: paths:
- 'dist-arch/**' - 'dist-arch/**'
- '.github/workflows/**' # workflow_dispatch:
workflow_dispatch:
jobs: jobs:
comment_on_discussion: comment_on_discussion:
@@ -14,20 +13,25 @@ jobs:
- name: Create comment on discussion #2140 - name: Create comment on discussion #2140
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment DISCUSSION_NUMBER: 2140
# https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment
run: | 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=' DISCUSSION_NODE_ID=$(gh api graphql -f query='
query { query {
repository( owner: "end-4", name: "dots-hyprland" ) repository( owner: "${{ github.repository.owner }}", name: "${{ github.repository.name }}" )
{ discussion(number: 2140) { id } } { discussion(number: '${DISCUSSION_NUMBER}') { id } }
}' | \ }' | \
jq -r '.data.repository.discussion.id') jq -r '.data.repository.discussion.id')
echo "The value of DISCUSSION_NODE_ID is ${DISCUSSION_NODE_ID}."
gh api graphql -f query=' gh api graphql -f query='
mutation { mutation {
addDiscussionComment(input:{ addDiscussionComment(input:{
discussionId: "$DISCUSSION_NODE_ID", discussionId: "'$DISCUSSION_NODE_ID'",
body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}.", body: "'$MESSAGE'",
}) { }) {
clientMutationId clientMutationId
comment { comment {
+1
View File
@@ -1,4 +1,5 @@
# Install scripts for Arch Linux # Install scripts for Arch Linux
## Old Dependency Installation Method ## Old Dependency Installation Method
The old deps install method mainly involved `./scriptdata/dependencies.conf` (which has been removed now). The old deps install method mainly involved `./scriptdata/dependencies.conf` (which has been removed now).