-
Notifications
You must be signed in to change notification settings - Fork 60
Build and publish container images #151
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've read, the permissions list in the .yml file dictates the granted permissions. Let me know if there is somewhere else to enable package permission for the token.
This seems good to me, but containers aren't my strength, so hopefully someone else can take validate the PR, @lil5 ?
The test pr seems a bit overkill, it's faster to checkout the pr locally and try it than waiting for GitHub to build it, then copy over locally. Someone even without any knowledge of git can use the GitHub instructions of their GitHub cli then run the dev docker compose. Two commands:
|
RUN --mount=type=cache,target=/go/pkg/mod go mod download | ||
|
||
ARG DATABAG_GOARCH | ||
ARG DATABAG_GOOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the args be placed first or doesn't that matter?
|
||
# # For building cross environment containers | ||
# build: | ||
# context: . | ||
# args: | ||
# DATABAG_GOARCH: arm64 | ||
# DATABAG_GOOS: linux | ||
# platform: "linux/arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
Great improvements on the cache locations 👍 |
Would you be able to test this code on a personal public Fork? It a bit iffy to merge without testing the full process. |
COPY ./net/web/package.json ./net/web/yarn.lock ./ | ||
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn \ | ||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn/v6,sharing=locked \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using sharing=locked could be an issue if 2 PRs are created at once
Closes: #150
This PR adds 2 new workflows
v*.*.*
, this workflow will be triggered and container images will be built and pushed to ghcr with the provided version as a tag.Other changes:
@balzack I think you'll need to setup a
GITHUB_TOKEN
secret in the repository settings with write access to packagesCould someone look over the doc changes and let me know if they make sense?