fix token
This commit is contained in:
parent
e844d029c5
commit
6746229e56
@ -19,7 +19,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Upload
|
- name: Upload
|
||||||
run: |
|
run: |
|
||||||
curl --fail -v -D /dev/stdout -o resp0.json --header "Authorization: Bearer ${{ inputs.token }}" \
|
curl --fail -v -D /dev/stdout -o resp0.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \
|
||||||
-X POST --data '{"Type":"actions_storage","Name":"${{ inputs.name }}"}' \
|
-X POST --data '{"Type":"actions_storage","Name":"${{ inputs.name }}"}' \
|
||||||
"${{ gitea.server_url }}/api/actions_pipeline/_apis/pipelines/workflows/${{ gitea.run_id }}/artifacts?api-version=6.0-preview"
|
"${{ gitea.server_url }}/api/actions_pipeline/_apis/pipelines/workflows/${{ gitea.run_id }}/artifacts?api-version=6.0-preview"
|
||||||
cat resp0.json
|
cat resp0.json
|
||||||
@ -27,14 +27,14 @@ runs:
|
|||||||
for artifact in ${{ inputs.path }}; do
|
for artifact in ${{ inputs.path }}; do
|
||||||
content_length=$(ls -l "$artifact" | awk '{print $5}')
|
content_length=$(ls -l "$artifact" | awk '{print $5}')
|
||||||
md5=$(openssl md5 -binary "$artifact" | base64)
|
md5=$(openssl md5 -binary "$artifact" | base64)
|
||||||
curl --fail -v -D /dev/stdout -o resp1.json --header "Authorization: Bearer ${{ inputs.token }}" \
|
curl --fail -v -D /dev/stdout -o resp1.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \
|
||||||
--header "x-actions-results-md5: $md5" \
|
--header "x-actions-results-md5: $md5" \
|
||||||
--header "x-tfs-filelength: ${content_length}" \
|
--header "x-tfs-filelength: ${content_length}" \
|
||||||
--header "content-range: bytes 0-$((content_length-1))/${content_length}" \
|
--header "content-range: bytes 0-$((content_length-1))/${content_length}" \
|
||||||
-X PUT --data-binary "@$artifact" \
|
-X PUT --data-binary "@$artifact" \
|
||||||
"${UPLOAD_URL}?retentionDays=${{ inputs.retention-days }}&itemPath=${{ inputs.name }}%2F$artifact"
|
"${UPLOAD_URL}?retentionDays=${{ inputs.retention-days }}&itemPath=${{ inputs.name }}%2F$artifact"
|
||||||
cat resp1.json
|
cat resp1.json
|
||||||
curl --fail -v -D /dev/stdout -o resp2.json --header "Authorization: Bearer ${{ inputs.token }}" \
|
curl --fail -v -D /dev/stdout -o resp2.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \
|
||||||
-X PATCH \
|
-X PATCH \
|
||||||
"${{ gitea.server_url }}/api/actions_pipeline/_apis/pipelines/workflows/${{ gitea.run_id }}/artifacts?api-version=6.0-preview&artifactName=${{ inputs.name }}"
|
"${{ gitea.server_url }}/api/actions_pipeline/_apis/pipelines/workflows/${{ gitea.run_id }}/artifacts?api-version=6.0-preview&artifactName=${{ inputs.name }}"
|
||||||
cat resp2.json
|
cat resp2.json
|
||||||
|
Loading…
Reference in New Issue
Block a user