-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.03 KB
/
web_artifact.yaml
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
# Download files from the web and upload them as workflow artifacts.
#
# Intended to save time and bandwidth from having to download the same file multiple times in a single workflow run.
name: Web artifacts
on:
workflow_call:
inputs:
name:
required: true
type: string
description: Artifact name. See 'actions/upload-artifact'.
urls:
required: true
type: string
description: JSON string encoding a list of download URLs.
retention-days:
type: number
default: 0
description: Artifact retention. See 'actions/upload-artifact'.
jobs:
download:
runs-on: ubuntu-latest
strategy:
matrix:
url: ${{ fromJSON(inputs.urls) }}
steps:
- name: Download file
# language=sh
run:
curl --create-dirs --output-dir artifacts -O ${{ matrix.url }}
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.name }}
path: artifacts
retention-days: ${{ inputs.retention-days }}