From ac7a5f9577140ccbb89b5764ff79687ebd027f82 Mon Sep 17 00:00:00 2001 From: Dimitrij Denissenko Date: Fri, 31 Oct 2025 14:30:23 +0000 Subject: [PATCH] Use shared build --- .github/workflows/build.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23f4b82..e5abddb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: ci +name: CI on: push: @@ -10,31 +10,10 @@ on: branches: - "main" -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}/console - jobs: - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - attestations: write - id-token: write - steps: - - uses: actions/checkout@v5 - - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@v6 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - cache-from: type=gha - cache-to: type=gha,mode=max + main: + uses: bsm/misc/.github/workflows/build-push-ghcr.yml@main + with: + image: ${{ github.repository }}/console + tags: | + type=raw,value=latest,enable={{is_default_branch}}