Initial test of download previous artifacts.
This commit is contained in:
38
github/github-download-previous-artifacts/action.yaml
Normal file
38
github/github-download-previous-artifacts/action.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: github-download-previous-artifacts
|
||||
description: "Download artifacts from a previous Workflow run."
|
||||
inputs:
|
||||
workflowPattern:
|
||||
description: "Pattern of the workflow name to match."
|
||||
required: true
|
||||
filePattern:
|
||||
description: "Pattern of the artifacts to match."
|
||||
required: true
|
||||
default: "*"
|
||||
artifactName:
|
||||
description: "Name of the artifact when it is downloaded. If not specified, the artifact will be named what the artifact is named."
|
||||
required: false
|
||||
default: ""
|
||||
unzipDir:
|
||||
description: "Directory to unzip the artifacts into. If not specified, the artifacts will not be unzipped."
|
||||
required: false
|
||||
default: ""
|
||||
outputs:
|
||||
query:
|
||||
description: "The query result."
|
||||
value: ${{ steps.query.outputs.console }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Download artifacts."
|
||||
uses: https://github.com/actions/github-script@v6
|
||||
continue-on-error: true
|
||||
env:
|
||||
WORKFLOW_FILENAME: ${{ inputs.workflowPattern }}
|
||||
ARTIFACT_NAME: ${{ inputs.filePattern }}
|
||||
ARTIFACT_FILENAME: ${{ inputs.artifactName }}
|
||||
UNZIP_DIR: ${{ inputs.unzipDir }}
|
||||
with:
|
||||
script: |
|
||||
const script = require('${{ github.action_path }}/download-previous-artifact.js')
|
||||
await script({github, context, core})
|
||||
shell: node
|
||||
Reference in New Issue
Block a user