Skip to content

Commit

Permalink
link ghcr package to repo
Browse files Browse the repository at this point in the history
link ghcr package to repo
  • Loading branch information
jacobnguyenn committed Aug 23, 2023
1 parent 2704ac7 commit 481c64c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
password: ${{secrets.GH_PAT}}
- name: 'Build Backend Image'
run: |
docker build --build-arg VERSION=${{ env.IMAGE_TAG }} --build-arg GIT_COMMIT=${{ github.sha }} --build-arg GIT_TREE_STATE=clean -f backend.Dockerfile . --tag ghcr.io/${{github.actor}}/gorya-backend:${{ env.IMAGE_TAG }}
docker build --build-arg VERSION=${{ env.IMAGE_TAG }} --build-arg GIT_COMMIT=${{ github.sha }} --build-arg GIT_TREE_STATE=clean --build-arg GH_ACTOR=${{github.actor}} --build-arg GH_REPO=${{ github.event.repository.name }} -f backend.Dockerfile . --tag ghcr.io/${{github.actor}}/gorya-backend:${{ env.IMAGE_TAG }}
docker push ghcr.io/${{github.actor}}/gorya-backend:${{ env.IMAGE_TAG }}
ui_image_publish:
Expand All @@ -52,5 +52,5 @@ jobs:
password: ${{secrets.GH_PAT}}
- name: 'Build UI Image'
run: |
docker build -f frontend.Dockerfile . --tag ghcr.io/${{github.actor}}/gorya-ui:${{ env.IMAGE_TAG }}
docker build --build-arg GH_ACTOR=${{github.actor}} --build-arg GH_REPO=${{ github.event.repository.name }} -f frontend.Dockerfile . --tag ghcr.io/${{github.actor}}/gorya-ui:${{ env.IMAGE_TAG }}
docker push ghcr.io/${{github.actor}}/gorya-ui:${{ env.IMAGE_TAG }}
4 changes: 3 additions & 1 deletion backend.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM cgr.dev/chainguard/go AS builder
ARG TARGETOS
ARG TARGETARCH
ARG GH_ACTOR
ARG GH_REPO
LABEL org.opencontainers.image.source=https://github.com/${GH_ACTOR}/${GH_REPO}

ARG VERSION_PACKAGE=github.com/nduyphuong/gorya/internal/version

Expand All @@ -17,4 +20,3 @@ RUN cd /app && GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
FROM cgr.dev/chainguard/glibc-dynamic
COPY --from=builder /app/gorya /usr/bin/
CMD ["/usr/bin/gorya", "api"]

1 change: 1 addition & 0 deletions frontend.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pull official base image
FROM node:current-alpine3.18
LABEL org.opencontainers.image.source=https://github.com/${GH_ACTOR}/${GH_REPO}

ENV NODE_OPTIONS=--openssl-legacy-provider
# set working directory
Expand Down

0 comments on commit 481c64c

Please sign in to comment.