Skip to content

Commit

Permalink
CI: Comment when done [wheel build]
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Sep 10, 2023
1 parent 4e24d5a commit cee4a1b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# https://github.com/airspeed-velocity/asv/blob/main/.github/workflows/wheels.yml
# include [wheel build] in the commit to trigger wheel builds
name: Build wheels
on: [push, pull_request, workflow_dispatch]
on: [push, workflow_dispatch, pull_request_target]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)
contents: write # for the comment action

jobs:
get_commit_message:
Expand Down Expand Up @@ -109,3 +109,20 @@ jobs:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1

comment_on_pr:
if: >-
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
github.event_name == pull_request_target'
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
with:
message: |
Artifacts generated for this PR:
- [Wheels](${{ github.server_url }}/${{ github.repository }}/actions/artifacts/)
Please download and test these to validate the PR.
comment_includes: "Artifacts generated for this PR"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cee4a1b

Please sign in to comment.