diff --git a/minio/mc-cp-previous-artifacts/action.yaml b/minio/mc-cp-previous-artifacts/action.yaml index ecab46e..00712dc 100644 --- a/minio/mc-cp-previous-artifacts/action.yaml +++ b/minio/mc-cp-previous-artifacts/action.yaml @@ -26,7 +26,7 @@ inputs: required: false default: "*" destBucket: - description: "Destination bucket." + description: "Destination bucket. Default: the repository name." required: true minioAccessKey: description: "S3 access key." @@ -60,11 +60,22 @@ runs: password: ${{ inputs.password }} nugetPasswords: ${{ inputs.nugetPasswords || inputs.password }} unzipDir: ${{ inputs.unzipDir }} + - name: "Get Bucket name." + id: bucket + run: | + if [[ -n "${{ inputs.destBucket }}" ]]; then + echo "destBucket=${{ inputs.destBucket }}" >> "$GITHUB_OUTPUT" + else + REPO="${{ github.repository }}" + REPO="${REPO##*/}" + echo "destBucket=$REPO" >> "$GITHUB_OUTPUT" + fi + shell: bash - name: "Copy files to Itch.io." uses: act/common/minio/mc-cp@master with: target: ${{ steps.download.outputs.downloadedArtifactPath }} - destBucket: ${{ inputs.alias }}/${{ inputs.destBucket }} + destBucket: ${{ inputs.alias }}/${{ steps.bucket.outputs.destBucket }} minioAccessKey: ${{ inputs.minioAccessKey }} minioSecretKey: ${{ inputs.minioSecretKey }} alias: ${{ inputs.alias }}