Compare commits

..

No commits in common. "wip" and "main" have entirely different histories.
wip ... main

2 changed files with 0 additions and 31 deletions

View File

@ -1,11 +0,0 @@
inputs:
name:
description: 'Artifact name'
path:
description: 'Destination path'
runs:
using: composite
steps:
- name: download artifacts
run: ${{ gitea.action_path }}/entrypoint.sh

View File

@ -1,20 +0,0 @@
#!/bin/bash -e
curl --fail -v -D /dev/stdout -o resp0.json --header "Authorization: Bearer ${{ inputs.token }}" \
"${{ gitea.server_url }}/api/actions_pipeline/_apis/pipelines/workflows/${{ gitea.run_id }}/artifacts?api-version=6.0-preview"
cat resp0.json
container_url=$(jq -r '.value.[] | select(.name == "${{ inputs.name }}").fileContainerResourceUrl' resp0.json)
echo $container_url
rm resp0.json
artifact_urlencode=$(echo "${{ inputs.name }}" | jq -Rr '@uri')
echo $artifact_urlencode
curl --fail -v -D /dev/stdout -o resp1.json --header "Authorization: Bearer ${{ inputs.token }}" \
"$container_url?itemPath=$artifact_urlencode"
cat resp1.json
for key in $(jq -r '.value[].path' resp1.json); do
artifact_url=$(jq -r ".value[] | select(.path == \"$key\").contentLocation" resp1.json)
key_urlencode=$(echo $key | jq -Rr '@uri')
curl --fail -v -D /dev/stdout -o "${{ inputs.path }}/$key" --create-dirs --header "Authorization: Bearer ${{ inputs.token }}" \
"$artifact_url?itemPath=$key_urlencode"
done
rm resp1.json