build(deps): bump execa from 2.1.0 to 9.5.3 #17
This file contains hidden or 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
"on": | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
workflow_dispatch: {} | |
name: Test | |
jobs: | |
happyPath: | |
name: "[TEST] Update existing pull request" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
id: run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
commit-message: Just testing [skip ci] | |
- if: ${{ steps.run.outputs.result != 'updated' }} | |
run: >- | |
echo "Action result output is \"${{ steps.run.outputs.result }}\" but | |
expected \"updated\"" && exit 1 | |
- if: ${{ !(steps.run.outputs.pull-request-number > 0) }} | |
run: >- | |
echo "Action pull-request-number output is | |
\"${{steps.run.outputs.pull-request-number}}\" but expected a number" | |
&& exit 1 | |
createNewPullRequest: | |
name: "[TEST] Create new pull request" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
id: run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request | |
body: This pull request is part of the CI - please ignore. | |
branch: test-create-new-pull-request-${{ github.run_number }} | |
commit-message: Just testing [skip ci] | |
author: J. Doe <[email protected]> | |
labels: test1, test2 | |
assignees: amanstep | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
:test-create-new-pull-request-${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: ${{ steps.run.outputs.result != 'created' }} | |
run: >- | |
echo "result output is \"${{ steps.run.outputs.result }}\" but | |
expected \"created\"" && exit 1 | |
- if: ${{ !(steps.run.outputs.pull-request-number > 0) }} | |
run: >- | |
echo "pull-request-number output is \"${{ | |
steps.run.outputs.pull-request-number }}\" but expected a number" && | |
exit 1 | |
multipleCommits: | |
name: "[TEST] Create multiple commits" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > file1.txt | |
- run: date > file2.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request with multiple commits | |
body: This pull request is part of the CI - please ignore. | |
branch: >- | |
test-create-new-pull-request-with-multiple-commits-${{ github.run_number }} | |
author: J. Doe <[email protected]> | |
path: file1.txt | |
commit-message: file 1 created [skip ci] | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request | |
body: This pull request is part of the CI - please ignore. | |
branch: >- | |
test-create-new-pull-request-with-multiple-commits-${{ github.run_number }} | |
author: J. Doe <[email protected]> | |
path: file2.txt | |
commit-message: file 2 created [skip ci] | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request | |
body: This pull request is part of the CI - please ignore. | |
branch: >- | |
test-create-new-pull-request-with-multiple-commits-${{github.run_number }} | |
author: J. Doe <[email protected]> | |
path: does_not_exist.txt | |
commit-message: this should fail silently, not commit should be created | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
:test-create-new-pull-request-with-multiple-commits-${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
autoMerge: | |
name: "[TEST] Auto merge" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request for `auto-merge` option | |
commit-message: Testing auto-merge | |
auto-merge: squash | |
branch: test-auto-merge-${{ github.run_number }} | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
:test-auto-merge-${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
hiddenFile: | |
name: "[TEST] Create or update pull request for hidden file" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > .github/test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
commit-message: Just testing [skip ci] | |
updatePRTitleAndBody: | |
name: "[TEST] Update PR title and body" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test pull request | |
body: This pull request is part of the CI - please ignore. | |
branch: test-update-pr-title-and-body-${{ github.run_number }} | |
commit-message: Just testing [skip ci] | |
- run: echo updated >> test.txt | |
- uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Skipped Updated test pull request | |
body: >- | |
This Skipped updated pull request is part of the CI - please | |
ignore. | |
branch: test-update-pr-title-and-body-${{ github.run_number }} | |
commit-message: Just testing [skip ci] | |
- run: echo updated >> test.txt | |
- uses: ./ | |
id: run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Updated test pull request | |
body: This updated pull request is part of the CI - please ignore. | |
branch: test-update-pr-title-and-body-${{ github.run_number }} | |
commit-message: Just testing [skip ci] | |
update-pull-request-title-and-body: true | |
- uses: octokit/request-action@05a2312de9f8207044c4c9e41fe19703986acc13 # v2.x | |
id: get-pull-request | |
with: | |
route: GET /repos/{owner}/{repo}/pulls/{pull_number} | |
owner: step-security | |
repo: create-or-update-pull-request-action | |
pull_number: ${{ steps.run.outputs.pull-request-number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
:test-update-pr-title-and-body-${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: >- | |
${{ fromJson(steps.get-pull-request.outputs.data).title != 'Updated | |
test pull request' }} | |
run: >- | |
echo "Pull request title is \"${{ | |
fromJson(steps.get-pull-request.outputs.data).title }}\" but expected | |
\"Updated test pull request\"" && exit 1 | |
addReviewers: | |
name: "[TEST] Add Reviewers" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: 20 | |
cache: npm | |
- run: date > test.txt | |
- run: npm ci | |
- run: npm run build | |
- uses: ./ | |
id: run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_STEP_DEBUG: true | |
with: | |
title: Test Add Reviewers | |
body: This pull request is part of the CI - please ignore. | |
branch: test-add-reviewers-${{ github.run_number }} | |
commit-message: Just testing [skip ci] | |
reviewers: amanstep | |
- uses: octokit/request-action@05a2312de9f8207044c4c9e41fe19703986acc13 # v2.x | |
id: get-pull-request | |
with: | |
route: GET /repos/{owner}/{repo}/pulls/{pull_number} | |
owner: step-security | |
repo: create-or-update-pull-request-action | |
pull_number: ${{ steps.run.outputs.pull-request-number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
:test-add-reviewers-${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: >- | |
${{ | |
!contains(toJson(fromJson(steps.get-pull-request.outputs.data).requested_reviewers.*.login), | |
'amanstep') }} | |
run: >- | |
echo "Requested reviewers are \"${{ | |
toJson(fromJson(steps.get-pull-request.outputs.data).requested_reviewers.*.login) | |
}}\" but expected \"[\n amanstep \n]\"" && exit 1 |