Files
common/github/download-previous-artifacts/action.yaml
2025-07-07 21:20:03 -07:00

70 lines
2.3 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.repository_owner }}"
password:
description: "Credentials to use for Gitea. If not specified, the GitHub/Gitea token will be used."
required: true
default: "${{ github.token }}"
accessToken:
description: "Access token for access to other repositories."
required: true
default: ""
workflowPattern:
description: "Pattern of the workflow name to match."
required: true
artifactPattern:
description: "Pattern of the artifacts to match."
required: true
default: "*"
artifactName:
description: "Name of the artifact when it is downloaded. If not specified, the artifact will be named what the artifact is named."
required: false
default: ""
unzipDir:
description: "Directory to unzip the artifacts into. If not specified, the artifacts will not be unzipped."
required: false
default: ""
nugetSources:
description: "List of additional NuGet sources to use."
required: false
default: "https://gitea.studiowhy.net/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:
# query:
# description: "The query result."
# value: ${{ steps.query.outputs.console }}
runs:
using: "composite"
steps:
- run: |
ls -al "${{ github.action_path }}"
shell: bash
- name: "Download artifacts."
uses: act/common/dotnet/dotnet-10@master
env:
WORKFLOW_FILENAME: ${{ inputs.workflowPattern }}
ARTIFACT_NAME: ${{ inputs.filePattern }}
ARTIFACT_FILENAME: ${{ inputs.artifactName }}
UNZIP_DIR: ${{ inputs.unzipDir }}
INPUTS: ${{ toJSON(inputs) }}
with:
command: run "${{ github.action_path }}/download-previous-artifacts.cs"
nugetSources: ${{ inputs.nugetSources }}
nugetUsernames: ${{ inputs.nugetUsernames }}
nugetPasswords: ${{ inputs.nugetPasswords }}