-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f522a83
commit 345d66b
Showing
5 changed files
with
246 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,178 +1,19 @@ | ||
name: "Build examples" | ||
|
||
on: [push, pull_request, workflow_call] | ||
name: Build examples | ||
|
||
on: | ||
# We cannot filter by path as this is a required check. See | ||
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
# Recommended by Graphite: https://graphite.dev/docs/github-configuration-guidelines#github-actions | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
nextjs-13-pages-wrap: | ||
name: "Next.js 13 + Page Router + withArcjet" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-13-pages-wrap | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-13-pages-wrap | ||
run: npm run build | ||
|
||
nextjs-14-app-dir-rl: | ||
name: "Next.js 14 + App Router + Rate Limit" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-app-dir-rl | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-app-dir-rl | ||
run: npm run build | ||
|
||
nextjs-14-app-dir-validate-email: | ||
name: "Next.js 14 + App Router + Validate Email" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-app-dir-validate-email | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-app-dir-validate-email | ||
run: npm run build | ||
|
||
nextjs-14-openai: | ||
name: "Next.js 14 + OpenAI" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-openai | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-openai | ||
run: npm run build | ||
|
||
nextjs-14-pages-wrap: | ||
name: "Next.js 14 + Page Router + withArcjet" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-pages-wrap | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-pages-wrap | ||
run: npm run build | ||
examples: | ||
uses: ./.github/workflows/reusable/examples.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
# Our reusable workflow files only use the `workflow_call` event and don't | ||
# specify a `concurrency` limit so those things can be managed by the caller. | ||
name: Reusable examples workflow | ||
|
||
on: [workflow_call] | ||
|
||
jobs: | ||
nextjs-13-pages-wrap: | ||
name: "Next.js 13 + Page Router + withArcjet" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-13-pages-wrap | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-13-pages-wrap | ||
run: npm run build | ||
|
||
nextjs-14-app-dir-rl: | ||
name: "Next.js 14 + App Router + Rate Limit" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-app-dir-rl | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-app-dir-rl | ||
run: npm run build | ||
|
||
nextjs-14-app-dir-validate-email: | ||
name: "Next.js 14 + App Router + Validate Email" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-app-dir-validate-email | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-app-dir-validate-email | ||
run: npm run build | ||
|
||
nextjs-14-openai: | ||
name: "Next.js 14 + OpenAI" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-openai | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-openai | ||
run: npm run build | ||
|
||
nextjs-14-pages-wrap: | ||
name: "Next.js 14 + Page Router + withArcjet" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Environment security | ||
- name: Step Security | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
# Checkout | ||
# Most toolchains require checkout first | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Language toolchains | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
# Workflow | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install example dependencies | ||
working-directory: examples/nextjs-14-pages-wrap | ||
run: npm ci | ||
|
||
- name: Build | ||
working-directory: examples/nextjs-14-pages-wrap | ||
run: npm run build |
Oops, something went wrong.