This downloads an artifact from your build implemented in python.
Specify a repository and an artifact name to download it. To allow access you have to pass your personal access token. Optionally a name for the downloaded artifact can be passed and the time to wait for an artifact to be available for download.
name: My Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Download artifact from build
uses: bettermarks/[email protected]
with:
repo: organization/the-repo-to-use
token: ${{ secrets.GITHUB_TOKEN }}
artifact_name: my-artifact
rename: new-artifact-name
wait_seconds: 60
Input | Description |
---|---|
repo |
The repository to download from |
token |
The personal access token |
artifact_name |
The name of the artifact to download |
rename (optional) |
An optional name for the downloaded artifact. Defaults to artifact_name . |
wait_seconds (optional) |
Time to wait for the artifact to be available for download. Defaults to 1 minute. |
Check the example to see how to use the output of the action
steps:
- name: Wait for artifact to succeed
uses: fountainhead/[email protected]
id: wait-for-build
with:
token: "${{ secrets.GITHUB_TOKEN }}"
checkName: artifact
- uses: actions/checkout@master
- name: Self test
id: selftest
# Put your action repo here
uses: bettermarks/action-artifact-download
with:
artifact_name: "${{ github.sha }}"
token: "${{ secrets.GITHUB_TOKEN }}"
rename: foobar
- name: Check outputs
run: |
test "${{ steps.selftest.outputs.success }}" == "Artifact downloaded: ${{ github.sha }}"
test -f foobar