Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
name: PR CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches-ignore:
- production
Comment on lines +5 to +6

Copilot AI Aug 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branches-ignore configuration conflicts with the conditional logic in jobs. Since you're adding if conditions to skip staging → production PRs, the branches-ignore: production will prevent the workflow from running at all for PRs targeting production, making the skip job unreachable.

Suggested change
branches-ignore:
- production

Copilot uses AI. Check for mistakes.
paths-ignore: []

jobs:
skip-if-staging-to-production:
if: github.event.pull_request.base.ref == 'production' && github.event.pull_request.head.ref == 'staging'
runs-on: ubuntu-latest
steps:
- run: echo "Skipping PR checks for staging -> production PR."
outputs:
skipped: true

Copilot AI Aug 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output value true should be quoted as 'true' in GitHub Actions. Unquoted boolean values may not be properly interpreted as strings when consumed by other jobs.

Suggested change
skipped: true
skipped: 'true'

Copilot uses AI. Check for mistakes.

lint:
if: github.event.pull_request.base.ref != 'production' || github.event.pull_request.head.ref != 'staging'
types: [opened, synchronize, reopened, ready_for_review]

Copilot AI Aug 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types key is incorrectly placed inside the lint job definition. The types configuration should be under the pull_request trigger at the workflow level, not within individual jobs.

Suggested change
types: [opened, synchronize, reopened, ready_for_review]

Copilot uses AI. Check for mistakes.

# Prevent duplicate runs on same PR head
concurrency:
Expand Down Expand Up @@ -60,6 +75,7 @@ jobs:
run: pnpm run lint

prebuild:
if: github.event.pull_request.base.ref != 'production' || github.event.pull_request.head.ref != 'staging'
name: Prebuild monorepo applications
runs-on: ubuntu-latest
needs: lint
Expand Down Expand Up @@ -204,6 +220,7 @@ jobs:
retention-days: 3

build-next:
if: github.event.pull_request.base.ref != 'production' || github.event.pull_request.head.ref != 'staging'
name: Build Next.js images (prebuilt, no push)
runs-on: ubuntu-latest
needs: prebuild
Expand Down Expand Up @@ -257,6 +274,7 @@ jobs:
docker image ls $IMAGE:$SHA_TAG

build-nitro:
if: github.event.pull_request.base.ref != 'production' || github.event.pull_request.head.ref != 'staging'
name: Build nitro-api image (prebuilt, no push)
runs-on: ubuntu-latest
needs: prebuild
Expand Down Expand Up @@ -302,6 +320,7 @@ jobs:
docker image ls $IMAGE:$SHA_TAG

summary:
if: github.event.pull_request.base.ref != 'production' || github.event.pull_request.head.ref != 'staging'
name: Summary
runs-on: ubuntu-latest
needs: [build-next, build-nitro]
Expand Down