From e3311a6d819c5482142c4239fda6b2521cdb8bac Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 31 Mar 2026 10:44:00 -0400 Subject: [PATCH] gh: update build --- .github/workflows/build.yml | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7341e80..802c4d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,8 @@ -name: Build and push container image +name: Build and Push on: push: - branches: [main] - pull_request: - branches: [main] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + branches: [master] jobs: build: @@ -18,35 +12,18 @@ jobs: packages: write steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - uses: actions/checkout@v4 - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ghcr.io 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=sha - type=raw,value=latest,enable={{is_default_branch}} - - name: Build and push uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + push: true + tags: ghcr.io/${{ github.repository }}:latest -- 2.51.2