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

Fix Docker build IV #13

Merged
merged 11 commits into from
Nov 25, 2024
Merged

Fix Docker build IV #13

merged 11 commits into from
Nov 25, 2024

Conversation

andy5995
Copy link
Contributor

(Fixes #7)


jobs:
build-env-image:
runs-on: ubuntu-24.04
env:
REGISTRY_IMAGE: ghcr.io/andy5995/vs-fltk
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy5995
Copy link
Contributor Author

I do vaguely recalling getting a PAT to use ghcr from the command line.

These instructions seem to confusingly indicate that a PAT isn't needed to push from a workflow though.

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry

@andy5995
Copy link
Contributor Author

@KaruroChori could you please check the repo settings mentioned here? docker/build-push-action#687 (comment)

@KaruroChori
Copy link
Owner

KaruroChori commented Nov 21, 2024

Thank you for you help!
I just tested the workflow in master after changing the permissions for the GITHUB_TOKEN as suggested and it works 🥳 .
I am not too happy with the amount of freedom I am giving to workflows to achieve that, so I might decide to set up an external more restricted token and use that for this specific workflow.
The important part is that there is now a functioning baseline and the image is properly generated.


on:
pull_request:
branches: master
paths:
- '**Dockerfile'
- '**docker.yml'
- 'docker/**'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured we want the docker tests to run if any file except for the README is changed, because the tests works in conjunction with the scripts and docker-compose.yml... Hmmm... but maybe different filters are needed for docker.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but maybe different filters are needed for docker.yml.

I reverted the change below in docker.yml. In theory, if it passes this test, there's no reason to trigger it for the other one. The build should have already been triggered by any changes here.. or not...

I dunno. Let me know what you think. Or we could avoid some thought and adjust later as needed.

Copy link
Owner

@KaruroChori KaruroChori Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue so that I don't forget about this and we can delay the decision as right now I don't have strong feelings about one or the other option :D.

@andy5995
Copy link
Contributor Author

andy5995 commented Nov 21, 2024

I'm glad you got it working. It looks like only the buildcache was pushed though. That's because I forgot the 'tags' key (which is included in this PR).

@andy5995
Copy link
Contributor Author

andy5995 commented Nov 24, 2024

Rebased. Up to date with master @ 330bf4e

@KaruroChori
Copy link
Owner

@andy5995 I left some notes in the review, I will have to address those before merging it.

Portable owner name & repo names back again
@KaruroChori KaruroChori merged commit f9eef02 into KaruroChori:master Nov 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile for CI and local testing
2 participants