-
Notifications
You must be signed in to change notification settings - Fork 299
91 lines (84 loc) · 3.5 KB
/
release_get_artifact.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Download workflow artifacts
on:
workflow_call:
inputs:
branch:
required: true
type: string
workflow:
required: true
type: string
jobs:
# release_job:
# uses: ./.github/workflows/release_get_artifact.yml
# with:
# branch: master
# workflow: library_shared.yml
get_artifact:
runs-on: ubuntu-latest
steps:
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
# Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed
# Required, if the artifact is from a different repo
# Required, if the repo is private a Personal Access Token with `repo` scope is needed
github_token: ${{ secrets.GITHUB_TOKEN }}
# Optional, workflow file name or ID
# If not specified, will be inferred from run_id (if run_id is specified), or will be the current workflow
workflow: ${{ inputs.workflow }}
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion:
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Use the empty string ("") to ignore status or conclusion in the search
workflow_conclusion: success
# Optional, will get head commit SHA
#pr: ${{github.event.pull_request.number}}
# Optional, no need to specify if PR is
#commit: ${{github.event.pull_request.head.sha}}
# Optional, will use the specified branch. Defaults to all branches
branch: ${{ inputs.branch }}
# Optional, defaults to all types
#event: push
# Optional, will use specified workflow run
#run_id: 1122334455
# Optional, run number from the workflow
#run_number: 34
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them into respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
#name: artifact_name
# Optional, a directory where to extract artifact(s), defaults to the current directory
path: binaries
# Optional, defaults to current repo
repo: ${{ github.repository }}
# Optional, check the workflow run to whether it has an artifact
# then will get the last available artifact from the previous workflow
# default false, just try to download from the last one
check_artifacts: false
# Optional, search for the last workflow run whose stored an artifact named as in `name` input
# default false
search_artifacts: false
# Optional, choose to skip unpacking the downloaded artifact(s)
# default false
skip_unpack: false
# Optional, choose how to exit the action if no artifact is found
# can be one of:
# "fail", "warn", "ignore"
# default fail
if_no_artifact_found: fail
- name: Display structure of downloaded files
run: |
set -x
ls -R
du -sh
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: binaries
retention-days: 1