From f66c1ea775d8d0ee264ffe3ed31403f1b25a1683 Mon Sep 17 00:00:00 2001 From: Scion Date: Thu, 10 Jul 2025 22:23:27 -0700 Subject: [PATCH] Added mc-cp-previous-artifacts. --- minio/mc-cp-previous-artifacts/action.yaml | 73 ++++++++++++++++++++++ minio/mc-cp/action.yaml | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 minio/mc-cp-previous-artifacts/action.yaml diff --git a/minio/mc-cp-previous-artifacts/action.yaml b/minio/mc-cp-previous-artifacts/action.yaml new file mode 100644 index 0000000..ecab46e --- /dev/null +++ b/minio/mc-cp-previous-artifacts/action.yaml @@ -0,0 +1,73 @@ +name: mc-cp-previous-artifacts +description: "Copy previous artifacts to MinIO." +inputs: + 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: "*" + password: + description: "Credentials to use for Gitea. If not specified, the GitHub/Gitea token will be used." + required: true + default: "${{ github.token }}" + nugetPasswords: + description: "Credentials to use for NuGet. If not specified, the password will be used." + required: true + default: "" + unzipDir: + description: "Directory to unzip the artifacts into. If not specified, the artifacts will not be unzipped." + required: false + default: "" + unzipPattern: + description: "Pattern of the files to upload from the unzipped artifacts." + required: false + default: "*" + destBucket: + description: "Destination bucket." + required: true + minioAccessKey: + description: "S3 access key." + required: true + minioSecretKey: + description: "S3 secret key." + required: true + alias: + description: "S3 alias." + required: true + default: "minio" + url: + description: "S3 url." + required: true + default: https://minio.studiowhy.net + recursive: + description: "Is the command recursive." + required: true + default: "true" + version: + description: "Version of the file to upload." + required: true +runs: + using: "composite" + steps: + - uses: act/common/gitea/download-previous-artifact@master + id: download + with: + workflowPattern: ${{ inputs.workflowPattern }} + artifactPattern: ${{ inputs.artifactPattern }} + password: ${{ inputs.password }} + nugetPasswords: ${{ inputs.nugetPasswords || inputs.password }} + unzipDir: ${{ inputs.unzipDir }} + - name: "Copy files to Itch.io." + uses: act/common/minio/mc-cp@master + with: + target: ${{ steps.download.outputs.downloadedArtifactPath }} + destBucket: ${{ inputs.alias }}/${{ inputs.destBucket }} + minioAccessKey: ${{ inputs.minioAccessKey }} + minioSecretKey: ${{ inputs.minioSecretKey }} + alias: ${{ inputs.alias }} + url: ${{ inputs.url }} + recursive: ${{ inputs.recursive }} + tags: "version=${{ inputs.version }}" diff --git a/minio/mc-cp/action.yaml b/minio/mc-cp/action.yaml index 4654a64..f1cb5bc 100644 --- a/minio/mc-cp/action.yaml +++ b/minio/mc-cp/action.yaml @@ -19,7 +19,7 @@ inputs: url: description: "S3 url." required: true - default: https://s3-us-gov-west-1.amazonaws.com + default: https://minio.studiowhy.net recursive: description: "Is the command recursive." required: true