Skip to content

Commit

Permalink
Auth with ghcr helm
Browse files Browse the repository at this point in the history
  • Loading branch information
fheinecke committed Mar 7, 2024
1 parent 9accad3 commit 80da9fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ tarball:
SAVE ARTIFACT $TARBALL_NAME AS LOCAL "outputs/$GOOS/$GOARCH/$TARBALL_NAME"

helm:
ARG CONTAINER_REGISTRY

FROM alpine/helm:3.14.2
WORKDIR /helm
COPY ./helm .
Expand All @@ -143,7 +141,9 @@ helm:
LET ARTIFACT_NAME=$(find . -name '*.tgz' -exec basename {} \\; | head -n 1)

SAVE ARTIFACT $ARTIFACT_NAME AS LOCAL "outputs/helm/$ARTIFACT_NAME"
RUN --push helm push "$ARTIFACT_NAME" "oci://ghcr.io/gravitational"
RUN --push --secret GH_TOKEN \
echo "$GH_TOKEN" | helm registry login ghcr.io/gravitational --username gravitational --password-stdin && \
helm push "$ARTIFACT_NAME" "oci://ghcr.io/gravitational"

all:
BUILD +binary
Expand Down

0 comments on commit 80da9fb

Please sign in to comment.