test github...
This commit is contained in:
parent
859d7584dd
commit
fbbe1c2af9
1 changed files with 11 additions and 2 deletions
13
action.yml
13
action.yml
|
@ -33,7 +33,8 @@ runs:
|
||||||
# ACTIONS_RUNTIME_TOKEN is not yet available (2024-08) for composite actions on Github :
|
# ACTIONS_RUNTIME_TOKEN is not yet available (2024-08) for composite actions on Github :
|
||||||
# https://github.com/actions/runner/issues/3046
|
# https://github.com/actions/runner/issues/3046
|
||||||
- name: Expose GitHub Runtime
|
- name: Expose GitHub Runtime
|
||||||
uses: crazy-max/ghaction-github-runtime@v3
|
uses: "crazy-max/ghaction-github-runtime@v3"
|
||||||
|
if: "{{ ! env.ACTIONS_RUNTIME_TOKEN }}"
|
||||||
|
|
||||||
- name: Upload artifact (using v4)
|
- name: Upload artifact (using v4)
|
||||||
shell: sh
|
shell: sh
|
||||||
|
@ -41,7 +42,7 @@ runs:
|
||||||
# Some optional help for debugging.
|
# Some optional help for debugging.
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Compatibility layer Forgejo/Gitea vs Github
|
# Compatibility layer for Github
|
||||||
test -z "$GITHUB_TOKEN" && GITHUB_TOKEN="${{ github.token }}"
|
test -z "$GITHUB_TOKEN" && GITHUB_TOKEN="${{ github.token }}"
|
||||||
|
|
||||||
# Compress the input paths into a zip archive
|
# Compress the input paths into a zip archive
|
||||||
|
@ -72,6 +73,14 @@ runs:
|
||||||
$( echo "$ACTIONS_RUNTIME_TOKEN" | sed 's/.*\.\(.*\)\..*/\1/' | base64 -d 2>/dev/null | sed 's/.*Actions.Results:\([^:]\+\):\([^:" ]\+\).*/\1 \2/' )
|
$( echo "$ACTIONS_RUNTIME_TOKEN" | sed 's/.*\.\(.*\)\..*/\1/' | base64 -d 2>/dev/null | sed 's/.*Actions.Results:\([^:]\+\):\([^:" ]\+\).*/\1 \2/' )
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
RESPONSE="$( echo wget -O - \
|
||||||
|
--header 'Content-Type:application/json' \
|
||||||
|
--header "Authorization: Bearer $GITHUB_TOKEN" \
|
||||||
|
--post-data "$( printf '{"version":4, "name":"%s", "workflow_run_backend_id":"%s", "workflow_job_run_backend_id":"%s"}' "${{ inputs.name }}" "$WORKFLOW_RUN_BACKEND_ID" "$WORKFLOW_JOB_RUN_BACKEND_ID" )" \
|
||||||
|
"$GITHUB_SERVER_URL"/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact
|
||||||
|
)"
|
||||||
|
echo "$RESPONSE" | base64
|
||||||
|
|
||||||
# Request an upload URL
|
# Request an upload URL
|
||||||
RESPONSE="$( wget -O - \
|
RESPONSE="$( wget -O - \
|
||||||
--header 'Content-Type:application/json' \
|
--header 'Content-Type:application/json' \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue