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

PRs fail because of Docker Logins are not set #339

Closed
1 task
jaydrogers opened this issue Apr 29, 2024 · 6 comments · Fixed by #340
Closed
1 task

PRs fail because of Docker Logins are not set #339

jaydrogers opened this issue Apr 29, 2024 · 6 comments · Fixed by #340
Assignees
Labels
🐛 Bug: Confirmed Bugs that are able to be replicated.

Comments

@jaydrogers
Copy link
Member

Problem

  • PRs fail because there are workflow dependencies for Docker logins to be configured

Examples

Proposed Solution

  • See if we can use GitHub packages only (instead of having people use a Dockerhub account)
@jaydrogers jaydrogers added the 🐛 Bug: Confirmed Bugs that are able to be replicated. label Apr 29, 2024
@jaydrogers jaydrogers self-assigned this Apr 29, 2024
@jaydrogers jaydrogers linked a pull request Apr 29, 2024 that will close this issue
@jaydrogers jaydrogers reopened this Apr 30, 2024
@szepeviktor
Copy link
Contributor

szepeviktor commented May 1, 2024

@jaydrogers There is a GHA context boolean variable for that

if: ${{ github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork }}

@jaydrogers
Copy link
Member Author

Thanks! I had something similar with that, but the problem I was running into was uploading to a registry dedicated for testing.

I don't want any possibility of giving away my production credentials and I attempted to even use GHA only, but that ran into permissions errors with the GHA token.

My other thought was to create a special user for DockerHub, but even with that, PRs don't have access to secrets -- meaning I would have to use unencrypted variables 😅

@szepeviktor
Copy link
Contributor

No, PR-s from forks should simply not publish Docker images.

@szepeviktor
Copy link
Contributor

@jaydrogers
Copy link
Member Author

I was thinking of having it create an image then dump it to a tar as an artifact?

It would just be nice to have a single source of truth for me to collaborate with someone.

That's why I was thinking some separate repository with totally separate credentials.

@jaydrogers
Copy link
Member Author

This has been fixed and GitHub Actions will only run if it is a PR from the main repository 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug: Confirmed Bugs that are able to be replicated.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants