subsurface/.github/workflows/artifact-links.yml
Michael Keller 888704e816 CICD: Have the Artifact Comment Workflow Suppress 'No Artifacts' Errors.
Suppress errors in the 'Add Artifact Comment' workflow if there are no
artifacts produced by the pull request workflow - this gets rid of
follow-on error messages when a pull request workflow encounters a build
error.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-05-15 13:29:25 +12:00

24 lines
691 B
YAML

name: Add artifact links to pull request
on:
workflow_run:
workflows: ["Ubuntu 16.04 / Qt 5.15-- for AppImage", "Mac", "Windows", "Android", "iOS"]
types: [completed]
jobs:
artifacts-url-comments:
name: Add artifact links to PR and issues
runs-on: ubuntu-22.04
steps:
- name: Add artifact links to PR and issues
if: github.event.workflow_run.event == 'pull_request'
uses: tonyhallett/artifacts-url-comments@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: "**Artifacts:**"
suffix: "_**WARNING:** Use at your own risk._"
format: name
addTo: pull
errorNoArtifacts: false