From 0ba30aa5b200bcebd32d5082fce611ff0c3ad55c Mon Sep 17 00:00:00 2001 From: bipproduction Date: Mon, 2 Mar 2026 13:20:05 +0800 Subject: [PATCH] tambahan --- .github/workflows/docker-publish.yml | 57 ++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 00000000..6ff1dfe0 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,57 @@ +name: Docker Build & Publish + +on: + push: + tags: + - "v*" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + BUN_PUBLIC_BASE_URL=${{ vars.BUN_PUBLIC_BASE_URL }} + cache-from: type=gha + cache-to: type=gha,mode=max + + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index ebd64b35..b4e54e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ next-env.d.ts # cache /cache -.github/ .env.*