Skip to content

Commit

Permalink
infra: Mark image build comments with eyes
Browse files Browse the repository at this point in the history
In other words, let's do the same thing that Packit does.
  • Loading branch information
VladimirSlavik committed Jul 31, 2023
1 parent 9dc6ea4 commit c4b61d9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build-boot-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
permissions:
contents: read
statuses: write
pull-requests: write

jobs:
pr-info:
Expand Down Expand Up @@ -79,6 +80,25 @@ jobs:
echo "image_description=pr$pr_num-$sha" >> $GITHUB_OUTPUT
fi
- name: Mark comment as seen
if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions \
-f content='eyes'
# https://docs.github.com/en/rest/reactions/reactions?apiVersion=2022-11-28#create-reaction-for-an-issue-comment
#uses: peter-evans/create-or-update-comment@v3
## https://github.com/marketplace/actions/create-or-update-comment
#with:
# comment-id: ${{ github.event.comment.id }}
# reactions: eyes
# reactions-edit-mode: append

- name: Set outputs
id: set_outputs
run: |
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/build-boot-iso.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
permissions:
contents: read
statuses: write
pull-requests: write

jobs:
pr-info:
Expand Down Expand Up @@ -73,6 +74,25 @@ jobs:
echo "image_description=pr$pr_num-$sha" >> $GITHUB_OUTPUT
fi

- name: Mark comment as seen
if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions \
-f content='eyes'
# https://docs.github.com/en/rest/reactions/reactions?apiVersion=2022-11-28#create-reaction-for-an-issue-comment
#uses: peter-evans/create-or-update-comment@v3
## https://github.com/marketplace/actions/create-or-update-comment
#with:
# comment-id: ${{ github.event.comment.id }}
# reactions: eyes
# reactions-edit-mode: append

- name: Set outputs
id: set_outputs
run: |
Expand Down

0 comments on commit c4b61d9

Please sign in to comment.