Update eslint to v8.14.0 (#1691) #1013
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
name: cleanup-closed-pull-requests | |
on: | |
pull_request: | |
paths: | |
- cleanup-closed-pull-requests/** | |
- '*.json' | |
- '*.yaml' | |
- .github/workflows/cleanup-closed-pull-requests.yaml | |
push: | |
branches: | |
- main | |
paths: | |
- cleanup-closed-pull-requests/** | |
- '*.json' | |
- '*.yaml' | |
- .github/workflows/cleanup-closed-pull-requests.yaml | |
concurrency: | |
group: ${{ github.workflow }}--${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
working-directory: cleanup-closed-pull-requests | |
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 '[email protected]' | |
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: overlay-branch | |
- name: Set up an overlay branch | |
working-directory: overlay-branch | |
run: | | |
mkdir -vp monorepo-deploy-actions/overlay-${{ github.run_id }} | |
cd monorepo-deploy-actions/overlay-${{ github.run_id }} | |
touch pr-${{ github.event.pull_request.number }}.yaml # this should be kept | |
touch pr-${{ github.event.pull_request.number }}0.yaml # this should be deleted | |
git add . | |
git commit -m "Add overlay branch for e2e-test of ${GITHUB_REF}" | |
git push origin "HEAD:refs/heads/cleanup-closed-pull-requests-${{ github.run_id }}" | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.head_ref }} # avoid "shallow update not allowed" error | |
path: namespace-branch | |
- name: Set up namespace branches | |
working-directory: namespace-branch | |
run: | | |
touch dummy | |
git add . | |
# set the past commit date to be deleted by action | |
GIT_COMMITTER_DATE=2020-03-31T00:00:00Z git commit -m "Add namespace branch for e2e-test of ${GITHUB_REF}" | |
git push origin "HEAD:refs/heads/ns/monorepo-deploy-actions/overlay-${{ github.run_id }}/pr-${{ github.event.pull_request.number }}" # this should be kept | |
git push origin "HEAD:refs/heads/ns/monorepo-deploy-actions/overlay-${{ github.run_id }}/pr-${{ github.event.pull_request.number }}0" # this should be deleted | |
- uses: ./cleanup-closed-pull-requests | |
id: cleanup-closed-pull-requests | |
with: | |
overlay: overlay-${{ github.run_id }} | |
namespace-prefix: pr- | |
destination-repository: ${{ github.repository }} | |
destination-branch: cleanup-closed-pull-requests-${{ github.run_id }} | |
- name: Clean up the overlay branch | |
continue-on-error: true | |
if: always() | |
run: | | |
git push origin --delete "refs/heads/cleanup-closed-pull-requests-${{ github.run_id }}" | |
- name: Clean up the namespace branches | |
continue-on-error: true | |
if: always() | |
run: | | |
git push origin --delete \ | |
"refs/heads/ns/monorepo-deploy-actions/overlay-${{ github.run_id }}/pr-${{ github.event.pull_request.number }}" \ | |
"refs/heads/ns/monorepo-deploy-actions/overlay-${{ github.run_id }}/pr-${{ github.event.pull_request.number }}0" |