Files
2025-07-10 21:27:07 -07:00

75 lines
2.8 KiB
YAML

name: github-download-previous-artifacts
description: "Download artifacts from a previous Workflow run."
inputs:
host:
description: "Gitea host to query."
required: true
default: "${{ github.server_url }}"
username:
description: "Gitea user to query with."
required: true
default: "${{ github.actor }}"
password:
description: "Credentials to use for Gitea. If not specified, the GitHub/Gitea token will be used."
required: true
default: "${{ github.token }}"
repoFullName:
description: "The full name of the repository that ran the workflow to download from. Default: ${{ github.repository }}"
required: true
default: "${{ github.repository }}"
workflowPattern:
description: "Pattern of the workflow name to match. Supports wildcard or RegEx. Default: ${{ github.event.repository.workflow }}"
required: true
default: "${{ github.event.repository.workflow }}"
artifactPattern:
description: "Pattern of the artifacts to match. Supports wildcard or RegEx. Default: *"
required: true
default: "*"
branchPattern:
description: "Branch of the workflow to match. Supports wildcard or RegEx. Default: ${{ github.ref }}"
required: false
default: "${{ github.ref }}"
unzipDir:
description: "Directory to unzip the artifacts into. If not specified, the artifacts will not be unzipped."
required: false
default: ""
deleteAfterUnzip:
description: "Whether to delete the artifacts after unzipping. Default: false"
required: false
default: "false"
nugetSources:
description: "List of additional NuGet sources to use."
required: false
default: "${{ github.server_url }}/api/packages/FORK/nuget/index.json"
nugetUsernames:
description: "List of additional NuGet usernames to use."
required: false
default: "${{ github.actor }}"
nugetPasswords:
description: "List of additional NuGet passwords to use."
required: false
default: "${{ github.token }}"
outputs:
downloadedArtifactNames:
description: "The downloaded artifacts names"
value: ${{ steps.download.outputs.downloadedArtifactNames }}
downloadedArtifactPaths:
description: "The downloaded artifact paths."
value: ${{ steps.download.outputs.downloadedArtifactPaths }}
downloadedArtifactDirs:
description: "The extracted downloaded artifact directories."
value: ${{ steps.download.outputs.downloadedArtifactDirs }}
runs:
using: "composite"
steps:
- name: "Download artifacts."
id: download
uses: act/common/dotnet/dotnet-10@master
env:
INPUTS: ${{ toJSON(inputs) }}
with:
command: run "${{ github.action_path }}/download-previous-artifacts.cs"
nugetSources: ${{ inputs.nugetSources }}
nugetUsernames: ${{ inputs.nugetUsernames }}
nugetPasswords: ${{ inputs.nugetPasswords }}