30 lines
806 B
YAML
30 lines
806 B
YAML
name: download
|
|
description: "Download a file from a URL."
|
|
inputs:
|
|
url:
|
|
description: "Url to download from."
|
|
required: true
|
|
outputFile:
|
|
description: "Output file of the download."
|
|
required: false
|
|
default: ""
|
|
outputs:
|
|
file:
|
|
description: "The path of the downloaded file."
|
|
value: ${{ steps.download.outputs.file }}
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- run: cp -f ${{ github.action_path }}/download.sh _download.sh
|
|
shell: bash
|
|
- name: "Download file."
|
|
id: download
|
|
uses: act/common/distros/rockylinux@master
|
|
with:
|
|
args: sh "_download.sh" "${{ inputs.url }}" "${{ inputs.outputFile }}"
|
|
- run: rm _download.sh
|
|
shell: bash
|
|
- name: "Own artifacts."
|
|
uses: act/common/utils/chown@master
|
|
with:
|
|
file: ${{ steps.download.outputs.file }} |