From 48728af48a458bc94ee7d19b68e4e2f932665c5e Mon Sep 17 00:00:00 2001 From: maddalax Date: Sat, 21 Sep 2024 13:33:35 -0500 Subject: [PATCH] tag as latest --- .github/workflows/release-site.yml | 10 ++-------- htmgo-site/Dockerfile | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-site.yml b/.github/workflows/release-site.yml index 321fdf4..5de6c11 100644 --- a/.github/workflows/release-site.yml +++ b/.github/workflows/release-site.yml @@ -32,17 +32,11 @@ jobs: - name: Build Docker image run: | cd ./htmgo-site && docker build -t ghcr.io/${{ github.repository_owner }}/htmgo-site:${{ steps.vars.outputs.short_sha }} . + cd ./htmgo-site && docker tag ghcr.io/${{ github.repository_owner }}/htmgo-site:${{ steps.vars.outputs.short_sha }} ghcr.io/${{ github.repository_owner }}/htmgo-site:latest - name: Log in to GitHub Container Registry run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Push Docker image run: | - docker push ghcr.io/${{ github.repository_owner }}/htmgo-site:${{ steps.vars.outputs.short_sha }} - - - name: Create Git tag - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git tag ${{ steps.vars.outputs.short_sha }} - git push origin ${{ steps.vars.outputs.short_sha }} \ No newline at end of file + docker push ghcr.io/${{ github.repository_owner }}/htmgo-site:${{ steps.vars.outputs.short_sha }} \ No newline at end of file diff --git a/htmgo-site/Dockerfile b/htmgo-site/Dockerfile index 3702349..39cf8a3 100644 --- a/htmgo-site/Dockerfile +++ b/htmgo-site/Dockerfile @@ -20,6 +20,7 @@ COPY . . # Build the Go binary for Linux RUN GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build + # Stage 2: Create the smallest possible image FROM gcr.io/distroless/base-debian11