diff --git a/.github/labeler.yml b/.github/labeler.yml index 5c4bdb19..afb40e5d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -21,7 +21,7 @@ infrastructure: - any-glob-to-any-file: '.eslistrc.json' next: - changed-files: - - any-glob-to-any-file: ['.next/**', '*.config.js', '*.config.ts', 'tsconfig.json'] + - any-glob-to-any-file: ['*.config.js', '*.config.ts', 'tsconfig.json'] ci: - changed-files: - any-glob-to-any-file: ['.github/workflows/*.yml', '.github/dependabot.yml'] diff --git a/.github/workflows/bun-test.yml b/.github/workflows/bun-test.yml index 4b7dffbd..64e00dcd 100644 --- a/.github/workflows/bun-test.yml +++ b/.github/workflows/bun-test.yml @@ -10,6 +10,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" @@ -21,6 +22,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index 71868580..66db71aa 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -10,6 +10,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" @@ -21,6 +22,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" diff --git a/.github/workflows/push-image.yml b/.github/workflows/push-image.yml index a3fdbed6..fd9ca19f 100644 --- a/.github/workflows/push-image.yml +++ b/.github/workflows/push-image.yml @@ -11,6 +11,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" @@ -22,6 +23,7 @@ on: paths: - "app/**" - "public/**" + - "bun.lockb" - "next.config.js" - "package.json" - "postcss.config.js" @@ -56,7 +58,7 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PAT }} - name: Login to GitHub Container Registry - if: github.repository_owner == env.REPOSITORY_OWNER + if: github.repository_owner == env.REPOSITORY_OWNER && github.event_name != 'pull_request_target' uses: docker/login-action@v3 with: registry: ${{ env.GHCR_REGISTRY }} @@ -70,6 +72,7 @@ jobs: ${{ env.REPOSITORY }} ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REPOSITORY }} - name: Build and push + if: github.event_name != 'pull_request_target' uses: docker/build-push-action@v5 with: context: . @@ -81,6 +84,17 @@ jobs: cache-to: type=inline outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=homepage multi-arch image provenance: false + - name: Build and load + if: github.repository_owner == env.REPOSITORY_OWNER && github.event_name == 'pull_request_target' + uses: docker/build-push-action@v5 + with: + context: . + load: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ env.REPOSITORY }}:main + cache-to: type=inline + provenance: false - name: Docker Scout if: github.repository_owner == env.REPOSITORY_OWNER && github.event_name == 'pull_request_target' uses: docker/scout-action@v1