get_artifact_url: Get artifact file URL

View source: R/get_artifact_url.R

get_artifact_urlR Documentation

Get artifact file URL

Description

If you have a GitHub actions that uploads an artifact file, this function can retrieve the URL for you to use to download that file.

Usage

get_artifact_url(artifact_name, repo_name = NULL, git_pat = NULL)

Arguments

artifact_name

The job name of the artifact to be retrieved, for example "spell-check-results" document of the chapter in the repository you are retrieving it from that you would like to include in the current document. e.g "docs/intro.md" or "intro.md"

repo_name

A character vector indicating the repo name of where you are borrowing from. e.g. "jhudsl/OTTR_Template/". For a Wiki of a repo, use "wiki/jhudsl/OTTR_Template/" If nothing is provided, will look for local file.

git_pat

A personal access token from GitHub. Only necessary if the repository being checked is a private repository.

Value

A download url for the most recent run that matches the artifact name.

Examples

## Not run: 

# If in GitHub actions you have something like this:

#     - name: Archive spelling errors
#       uses: actions/upload-artifact\@v2
#       with:
#         name: spell-check-results
#         path: spell_check_results.tsv

# This you can run this:

cow::get_artifact_url(
  artifact_name = "spell-check-results",
  repo_name = "jhudsl/OTTR_Template",
  git_pat = "gh_12345"
)

## End(Not run)


jhudsl/cow documentation built on April 17, 2025, 3:14 p.m.