Skip to content

Commit 9bdaa6b

Browse files
committed
fix: endret i token håndtering
1 parent 8b35a37 commit 9bdaa6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/commitFiles/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ runs:
7272
# Add the files array to the JSON payload
7373
JSON_PAYLOAD=$(echo "$JSON_PAYLOAD" | jq --argjson files "$FILES_ARRAY" '.variables.files |= $files')
7474
75-
echo "${green}${bold}Executing GraphQL query via curl:${reset} ${yellow}curl -X POST -H 'Authorization: bearer ***' -H 'Content-Type: application/json' -d '$JSON_PAYLOAD' https://api.github.com/graphql${reset}"
75+
echo "${green}${bold}Executing GraphQL query via curl:${reset} ${yellow}curl --silent --show-error -X POST -H 'Authorization: bearer ***' -H 'Content-Type: application/json' -d '$JSON_PAYLOAD' https://api.github.com/graphql${reset}"
7676
7777
# Actually execute the curl command
7878
if ! curl_output=$(curl --silent --show-error -X POST \
79-
-H 'Authorization: bearer ${GH_TOKEN}' \
79+
-H 'Authorization: token ${GITHUB_TOKEN}' \
8080
-H 'Content-Type: application/json' \
8181
-d "$JSON_PAYLOAD" \
8282
https://api.github.com/graphql 2>&1); then
83-
echo "::error::Failed to commit changes. Curl output: $curl_output"
83+
echo "::error title=Failed to commit changes.::Curl output: $curl_output"
8484
exit 1
8585
fi
8686
@@ -94,4 +94,4 @@ runs:
9494
REF_NAME: ${{ github.ref_name }}
9595
FILES: ${{ inputs.files }}
9696
COMMIT_MESSAGE: ${{ inputs.commitMessage }}
97-
GH_TOKEN: ${{ inputs.token }}
97+
GITHUB_TOKEN: ${{ inputs.token }}

0 commit comments

Comments
 (0)