Skip to content

Update dependency @aws-sdk/client-secrets-manager to v3.686.0 (resolv… #976

Update dependency @aws-sdk/client-secrets-manager to v3.686.0 (resolv…

Update dependency @aws-sdk/client-secrets-manager to v3.686.0 (resolv… #976

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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 }}"