PicoCentauri / comment-artifact

GitHub Actions for updating PR description with a link to download an artifact

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a GitHub Action Using TypeScript

GitHub Super-Linter CI Check dist/ CodeQL

Add artifact link to Pull Requests

Comment Actions Artifacts from your Workflow Runs.

The action automatically edits Pull Requests' descriptions with link to download one or more artifacts. This action is heavily inspired by the ReadTheDocs action and download-artofact action

Example

Example of a description edited with link to download artifacts

Usage

- uses: PicoCentauri/comment-artifact@v1
  with:
    # Name of artifact defined using the
    # Default is 'artifact'
    name:

    # Description of link text that should appear in the updated comment of your
    # pull request. Default is 'Download artifact for this pull request'
    description:

    # Destination path. Supports basic tilde expansion.
    # Optional. Default is $GITHUB_WORKSPACE
    path:

    # A glob pattern to the artifacts that should be downloaded.
    # Ignored if name is specified.
    # Optional.
    pattern:

    # The GitHub token used to authenticate with the GitHub API.
    # This is required when downloading artifacts from a different repository or from a different workflow run.
    # Optional. If unspecified, the action will download artifacts from the current repo and the current workflow run.
    github-token:

    # The repository owner and the repository name joined together by "/".
    # If github-token is specified, this is the repository that artifacts will be downloaded from.
    # Optional. Default is ${{ github.repository }}
    repository:

    # The id of the workflow run where the desired download artifact was uploaded from.
    # If github-token is specified, this is the run that artifacts will be downloaded from.
    # Optional. Default is ${{ github.run_id }}
    run-id:

To allow to update the comment update the permissions of your job to

permissions:
  pull-requests: write

About

GitHub Actions for updating PR description with a link to download an artifact

License:MIT License


Languages

Language:TypeScript 75.0%Language:Shell 25.0%