Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 7 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,10 @@ concurrency:
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run format:check
- run: npm run lint
- run: npm run type:check
- run: npm run test:run
- name: Mutation targets
if: github.event_name == 'pull_request'
id: targets
env:
BASE: origin/${{ github.base_ref }}
run: echo "files=$(scripts/mutation-targets.sh "$BASE")" >> "$GITHUB_OUTPUT"
- name: Mutation test the changed logic
if: github.event_name == 'pull_request' && steps.targets.outputs.files != ''
timeout-minutes: 40
env:
FILES: ${{ steps.targets.outputs.files }}
run: |
npm i --no-save @stryker-mutator/core@10.1.1 @stryker-mutator/vitest-runner@10.1.1
npx stryker run --mutate "$FILES"
ci:
permissions:
contents: read
pull-requests: write
uses: Endika/.github/.github/workflows/web-ci.yml@v1
with:
mutation-timeout: 40
19 changes: 3 additions & 16 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,15 @@ on:
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1"
- cron: 0 6 * * 1

permissions:
contents: read

jobs:
analyze:
name: Analyze JavaScript/TypeScript
runs-on: ubuntu-latest
timeout-minutes: 20
codeql:
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v7

- uses: github/codeql-action/init@v4
with:
languages: javascript-typescript
queries: security-and-quality

- uses: github/codeql-action/analyze@v4
with:
category: "/language:javascript-typescript"
uses: Endika/.github/.github/workflows/codeql.yml@v1
13 changes: 4 additions & 9 deletions .github/workflows/delete-closed-pr-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ on:
types: [closed]

permissions:
contents: write
contents: read

jobs:
delete:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.event.pull_request.head.ref }}
run: gh api -X DELETE "repos/$REPO/git/refs/heads/$BRANCH" 2>/dev/null || true
permissions:
contents: write
uses: Endika/.github/.github/workflows/delete-closed-pr-branch.yml@v1
26 changes: 8 additions & 18 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
name: Dependabot auto-merge

# pull_request_target hands the run the Actions secrets (the PAT); the called
# workflow only acts on same-repo Dependabot pull requests and never checks out their code.
on: pull_request_target

permissions:
contents: write
pull-requests: write
contents: read

jobs:
auto-merge:
# This job holds the PAT: only same-repo pull requests opened by Dependabot itself.
if: >-
github.event.pull_request.user.login == 'dependabot[bot]'
&& github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- id: meta
uses: dependabot/fetch-metadata@v3
# The PAT, not GITHUB_TOKEN: a merge authored by GITHUB_TOKEN is a push that
# triggers no workflow at all, so neither release-please nor the deploy would
# ever run for an auto-merged bump.
- if: steps.meta.outputs.update-type == 'version-update:semver-minor' || steps.meta.outputs.update-type == 'version-update:semver-patch'
env:
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: gh pr merge --rebase --auto "$PR_URL"
permissions:
contents: write
pull-requests: write
uses: Endika/.github/.github/workflows/dependabot-auto-merge.yml@v1
secrets: inherit
42 changes: 6 additions & 36 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,16 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
env:
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
VITE_GOOGLE_MAPS_KEY: ${{ secrets.VITE_GOOGLE_MAPS_KEY }}
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url || steps.deploy_retry.outputs.page_url }}
steps:
- id: deploy
continue-on-error: true
uses: actions/deploy-pages@v5
# Pages sometimes cannot see the artifact just uploaded; a rerun would upload a second one.
- if: steps.deploy.outcome == 'failure'
run: sleep 60
- id: deploy_retry
if: steps.deploy.outcome == 'failure'
uses: actions/deploy-pages@v5
permissions:
contents: read
pages: write
id-token: write
uses: Endika/.github/.github/workflows/web-deploy.yml@v1
secrets: inherit
27 changes: 6 additions & 21 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,16 @@ on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write
contents: read

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: googleapis/release-please-action@v5
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# Enable native auto-merge and stop; GitHub rebase-merges once the required
# checks pass, and that PAT-authored merge is a push to main that both
# re-triggers this workflow to cut the tag/release and triggers the deploy
# (on: push), so no explicit deploy dispatch is needed here.
- if: ${{ steps.release.outputs.pr }}
env:
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
REPO: ${{ github.repository }}
PR_JSON: ${{ steps.release.outputs.pr }}
run: gh pr merge --rebase --auto -R "$REPO" "$(echo "$PR_JSON" | jq -r .number)"
permissions:
contents: write
pull-requests: write
uses: Endika/.github/.github/workflows/release-please.yml@v1
secrets: inherit
22 changes: 0 additions & 22 deletions .github/workflows/security.yml

This file was deleted.