Skip to content

Update dependency @biomejs/biome to v2.3.8 (bootstrap-pull-request) (… #1918

Update dependency @biomejs/biome to v2.3.8 (bootstrap-pull-request) (…

Update dependency @biomejs/biome to v2.3.8 (bootstrap-pull-request) (… #1918

name: bootstrap-pull-request
on:
pull_request:
paths:
- bootstrap-pull-request/**
- '*.json'
- '*.yaml'
- .github/workflows/bootstrap-pull-request.yaml
push:
branches:
- main
paths:
- bootstrap-pull-request/**
- '*.json'
- '*.yaml'
- .github/workflows/bootstrap-pull-request.yaml
defaults:
run:
working-directory: bootstrap-pull-request
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: .node-version
- run: npm install -g pnpm@latest-10
- run: pnpm i
- run: pnpm check --fix
- uses: int128/update-generated-files-action@f6dc44e35ce252932e9018f1c38d1e2a4ff80e14 # v2.60.0
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: .node-version
- run: npm install -g pnpm@latest-10
- run: pnpm i
- run: pnpm test
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: .node-version
- run: npm install -g pnpm@latest-10
- run: pnpm i
- run: pnpm build
- run: |
git config --global user.email 'github-actions@github.com'
git config --global user.name 'github-actions'
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
ref: ${{ github.head_ref }} # avoid "shallow update not allowed" error
path: prebuilt-branch
- name: Set up an prebuilt branch
working-directory: prebuilt-branch
run: |
cp -av "$GITHUB_WORKSPACE/bootstrap-pull-request/tests/fixtures/prebuilt/." .
git add .
git commit -m "Add prebuilt branch for e2e-test of ${GITHUB_REF}"
git push origin "HEAD:refs/heads/bootstrap-pull-request-e2e-prebuilt-${{ github.run_id }}"
- uses: ./bootstrap-pull-request
with:
overlay: overlay-${{ github.run_id }}
namespace: pr-${{ github.event.number }}
destination-repository: ${{ github.repository }}
prebuilt-branch: bootstrap-pull-request-e2e-prebuilt-${{ github.run_id }}
substitute-variables: NAMESPACE=pr-${{ github.event.number }}
# This action should be idempotent
- uses: ./bootstrap-pull-request
with:
overlay: overlay-${{ github.run_id }}
namespace: pr-${{ github.event.number }}
destination-repository: ${{ github.repository }}
prebuilt-branch: bootstrap-pull-request-e2e-prebuilt-${{ github.run_id }}
substitute-variables: NAMESPACE=pr-${{ github.event.number }}
aggregate-prebuilt-services-to-namespace-directory: true
- name: Clean up the namespace branch
continue-on-error: true
if: always()
run: |
git push origin --delete "refs/heads/ns/monorepo-deploy-actions/overlay-${{ github.run_id }}/pr-${{ github.event.number }}"
- name: Clean up the prebuilt branch
continue-on-error: true
if: always()
run: |
git push origin --delete "refs/heads/bootstrap-pull-request-e2e-prebuilt-${{ github.run_id }}"