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

Exit With Error If Push Fails #26

Open
DonovanDMC opened this issue Dec 10, 2022 · 3 comments
Open

Exit With Error If Push Fails #26

DonovanDMC opened this issue Dec 10, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@DonovanDMC
Copy link

DonovanDMC commented Dec 10, 2022

Currently, the jobs shows as successfully ran even if the push actually failed. This makes taking a quick look to see if a push succeeded impossible.

For instance, if the image does not exist yet:

denied: permission_denied: The requested installation does not exist.

or if the action cannot push to the specific package:

denied: permission_denied: write_package

both of these are failures, but the run exits as if everything went just fine
image

@macbre macbre added the bug Something isn't working label Dec 10, 2022
macbre added a commit that referenced this issue Jan 23, 2023
Trying to resolve #26
@macbre
Copy link
Owner

macbre commented Jan 23, 2023

@DonovanDMC - thanks for a bug report.

Are you using the latest version of the push-to-ghcr action? I'm trying to reproduce that issue (see #27) and the action ends with the exit code 1 (hence breaking the process):

Screenshot 2023-01-23 at 18 07 33

@DonovanDMC
Copy link
Author

DonovanDMC commented Jan 23, 2023

You're testing against a condition that returns an exit code, so of course it exits fine

https://github.com/DonovanDMC/Websites/blob/master/.github/workflows/publish-container.yml

I can very reliably reproduce this by pushing to a package that doesn't exist, or pushing to one that you only have read only access for.

Screenshot_20230123_123338_Firefox Nightly

The run completed as if everything went fine, despite the second to last line showing that the push failed

@kthy
Copy link

kthy commented Apr 16, 2024

We just got bit by this as well:

▸ Run macbre/push-to-ghcr@master
▸ Run echo "Using $(docker -v)"
Using Docker version 24.0.9, build 2936816
▸ Logging into the GitHub Container registry (ghcr.io) ...
▸ Set commit tag and image name
▸ Building the Docker image: ghcr.io/utiligize/assetlife-api:latest from ./Dockerfile in . context ...
▸ Inspecting the image ...
▾ Pushing the Docker image to ghcr.io ...
  denied: installation not allowed to Write organization package
Notice: NOT pushing the Docker image to docker.io ... Provide 'docker_io_token' if needed.

The action completes as green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants