-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (51 loc) · 1.9 KB
/
action.yml
File metadata and controls
54 lines (51 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Download-CIArtifact (by PSModule)
description: Downloads an artifact from a CI workflow.
author: PSModule
branding:
icon: download-cloud
color: white
inputs:
Path:
description: The path to the artifact to download.
required: false
WorkflowID:
description: The filename or ID of the workflow to download the artifact from. You must provide either `WorkflowID` or `WorkflowRunID`.
required: false
default: ''
WorkflowRunID:
description: |
The ID of the workflow run where the artifact will be downloaded from.
You must provide either `WorkflowID` or `WorkflowRunID`.
required: false
default: ''
ArtifactName:
description: Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.
required: true
GITHUB_TOKEN:
description: The GitHub token used to authenticate with the GitHub API.
required: true
WorkingDirectory:
description: The working directory where the artifact will be downloaded to. Default is the root of the repository.
required: false
runs:
using: composite
steps:
- name: Get Workflow Run ID
id: workflow_run_id
shell: pwsh
working-directory: ${{ inputs.WorkingDirectory }}
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
PSMODULE_DOWNLOAD_CIARTIFACT_INPUT_Path: ${{ inputs.Path }}
PSMODULE_DOWNLOAD_CIARTIFACT_INPUT_WorkflowID: ${{ inputs.WorkflowID }}
PSMODULE_DOWNLOAD_CIARTIFACT_INPUT_WorkflowRunID: ${{ inputs.WorkflowRunID }}
run: |
# Download-CIArtifact
${{ github.action_path }}/src/main.ps1
- name: Download Artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.ArtifactName }}
path: ${{ steps.workflow_run_id.outputs.Path }}
github-token: ${{ github.token }}
run-id: ${{ steps.workflow_run_id.outputs.RunID }}