Skip to content

Update dependency @types/node to v20.16.2 #716

Update dependency @types/node to v20.16.2

Update dependency @types/node to v20.16.2 #716

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:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm test
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
- run: corepack enable pnpm
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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: |
mkdir -vp services/a
mkdir -vp services/b
touch services/a/generated.yaml
touch services/b/generated.yaml
git add .
git commit -m "Add prebuilt branch for e2e-test of ${GITHUB_REF}"
git push origin "HEAD:refs/heads/prebuilt/monorepo-deploy-actions/overlay-${{ github.run_id }}"
- uses: ./bootstrap-pull-request
with:
overlay: overlay-${{ github.run_id }}
namespace: pr-${{ github.event.number }}
destination-repository: ${{ github.repository }}
namespace-manifest: bootstrap-pull-request/tests/fixtures/namespace.yaml
substitute-variables: NAMESPACE=pr-${{ github.event.number }}
# the action should be idempotent
- uses: ./bootstrap-pull-request
with:
overlay: overlay-${{ github.run_id }}
namespace: pr-${{ github.event.number }}
destination-repository: ${{ github.repository }}
namespace-manifest: bootstrap-pull-request/tests/fixtures/namespace.yaml
substitute-variables: NAMESPACE=pr-${{ github.event.number }}
- 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/prebuilt/monorepo-deploy-actions/overlay-${{ github.run_id }}"