tag as latest

This commit is contained in:
maddalax 2024-09-21 13:33:35 -05:00
parent a9d949b161
commit 48728af48a
2 changed files with 3 additions and 8 deletions

View file

@ -32,6 +32,7 @@ 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
@ -39,10 +40,3 @@ jobs:
- 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 }}

View file

@ -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