Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action fails on GitHub Enterprise with wrong exit status #42

Open
lcmgh opened this issue Apr 14, 2022 · 5 comments
Open

Action fails on GitHub Enterprise with wrong exit status #42

lcmgh opened this issue Apr 14, 2022 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs-testing Needs further testing to narrow down problem

Comments

@lcmgh
Copy link

lcmgh commented Apr 14, 2022

::info::Packing files: app README.md
  adding: app (deflated 71%)
  adding: README.md (deflated 50%)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 98 4611k    0     0   98 4[543](https://my-enterprise-gh/repo/runs/171095?check_suite_focus=true#step:4:543)k      0  5838k --:--:-- --:--:-- --:--:-- 5833k
100 4611k  100   149  100 4611k    163  5050k --:--:-- --:--:-- --:--:-- 5051k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   257  100   149  100   108    842    610 --:--:-- --:--:-- --:--:--  1460
{"message":"Error uploading to https://media.my-enterprise-gh/releases/528/files: 404","request_id":"fd3ece25-bbee-11ec-831b-8b2a0bb15fb9"}{"message":"Error uploading to https://media.my-enterprise-gh/releases/528/files: 404","request_id":"fdcb4c40-bbee-11ec-83f1-d6e3e75da99a"}
@lcmgh lcmgh changed the title Action succeeds on failure Action succeeds on upload failure Apr 14, 2022
@lcmgh
Copy link
Author

lcmgh commented Apr 14, 2022

Besides of the wrong exit I would like to know how I can fix the issue. I am using the action on GitHub Enterprise.

@lcmgh lcmgh changed the title Action succeeds on upload failure Action succeeds on upload failure / fails on GHE Apr 14, 2022
@lcmgh lcmgh changed the title Action succeeds on upload failure / fails on GHE Action succeeds on upload failure / fails on GitHub Enterprise Apr 14, 2022
@lcmgh lcmgh changed the title Action succeeds on upload failure / fails on GitHub Enterprise Action fails on GitHub Enterprise with wrong exit status Apr 14, 2022
@Douile
Copy link
Member

Douile commented Apr 14, 2022

Seems like a problem with GHE as we just get the upload URL from the event data

EVENT_DATA=$(cat "$GITHUB_EVENT_PATH")
echo "$EVENT_DATA" | jq .
UPLOAD_URL=$(echo "$EVENT_DATA" | jq -r .release.upload_url)
if [ "$UPLOAD_URL" = "null" ]; then
echo "::error file=entrypoint.sh::The event provided did not contain an upload URL, this workflow can only be used with the release event." >&2
exit 1
fi

What exit code are you getting?

@lcmgh
Copy link
Author

lcmgh commented Apr 14, 2022

What exit code are you getting?

The message from the log was the last output before it runs the post- steps and the workflow succeeds.

Douile added a commit that referenced this issue Apr 14, 2022
@lcmgh
Copy link
Author

lcmgh commented Apr 19, 2022

Using a Personal Access Token with repo rights instead of the regular secret.GITHUB_TOKEN solved the error uploading issue on GHE!

See actions/upload-release-asset#72 (comment)

@bew
Copy link

bew commented Oct 24, 2022

For your info, upgrading GHE to 3.6.x resolved the issue for us.

@Douile Douile added bug Something isn't working help wanted Extra attention is needed needs-testing Needs further testing to narrow down problem labels Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs-testing Needs further testing to narrow down problem
Development

No branches or pull requests

3 participants