Skip to content

Commit

Permalink
Add artifact links to pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Sep 3, 2024
1 parent bf3088f commit 70b3d60
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://github.com/subsurface/subsurface/blob/master/.github/workflows/artifact-links.yml

name: Add artifact links to pull request

on:
workflow_run:
workflows: ["Build All Architectures"]
types: [completed]

jobs:
artifacts-url-comments:
name: Add artifact links to PR and issues
runs-on: ubuntu-22.04

# Restrict permissions for the GITHUB_TOKEN, https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
issues: write
pull-requests: write
actions: read

steps:
- name: Add artifact links to PR and issues
if: github.event.workflow_run.event == 'pull_request'
uses: tonyhallett/artifacts-url-comments@0965ff1a7ae03c5c1644d3c30f956effea4e05ef # v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: "Build for testing:"
suffix: "Use at your own risk."
format: name
addTo: pull
errorNoArtifacts: false

0 comments on commit 70b3d60

Please sign in to comment.