Skip to content

Commit bf2e558

Browse files
committed
🐛 Adds Shell Specification for Run Steps
1 parent 965c10e commit bf2e558

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

GitVersion.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
next-version: 0.3
21
mode: ContinuousDelivery
32
# This version-bumping scheme requires semantic commits authored using Gitmoji.
43
# For more information on Gitmoji, see: https://gitmoji.dev/.

action.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,44 @@ runs:
1414
# Based on: https://nicolasiensen.github.io/2022-07-23-automating-dependency-updates-with-dependabot-github-auto-merge-and-github-actions/
1515
steps:
1616
- name: user-ineligible-PR-notice
17-
if: ${{ github.event.pull_request.user.login != inputs.required-pr-user-login }}
17+
if: github.event.pull_request.user.login != inputs.required-pr-user-login
1818
shell: bash
1919
run: echo "This is *not* a PR authored by '${{ inputs.required-pr-user-login }}', ignoring." >> $GITHUB_STEP_SUMMARY
2020
- name: user-eligible-PR-notice
21-
if: ${{ github.event.pull_request.user.login == inputs.required-pr-user-login }}
21+
if: github.event.pull_request.user.login == inputs.required-pr-user-login
2222
shell: bash
2323
run: echo "This *is* a PR authored by '${{ inputs.required-pr-user-login }}', inspecting." >> $GITHUB_STEP_SUMMARY
2424
- name: Dependabot metadata
25-
if: ${{ github.event.pull_request.user.login == inputs.required-pr-user-login }}
25+
if: github.event.pull_request.user.login == inputs.required-pr-user-login
2626
id: dependabot-metadata
2727
uses: dependabot/fetch-metadata@v1.6.0
2828
- name: Enable auto-merge for Dependabot PRs
29-
if: ${{ github.event.pull_request.user.login == inputs.required-pr-user-login }}
30-
run: gh pr merge --auto --merge "$PR_URL"
29+
if: github.event.pull_request.user.login == inputs.required-pr-user-login
3130
env:
32-
PR_URL: ${{ github.event.pull_request.html_url }}
33-
GITHUB_TOKEN: ${{ inputs.github_token }}
31+
PR_URL: "${{ github.event.pull_request.html_url }}"
32+
GITHUB_TOKEN: "${{ inputs.github_token }}"
33+
shell: bash
34+
run: gh pr merge --auto --merge "$PR_URL"
3435
- name: Approve patch and minor updates
3536
if: ${{ (steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor') && (github.event.pull_request.user.login == inputs.required-pr-user-login) }}
36-
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch or minor update**"
3737
env:
38-
PR_URL: ${{github.event.pull_request.html_url}}
39-
GITHUB_TOKEN: ${{ inputs.github_token }}
38+
PR_URL: "${{ github.event.pull_request.html_url }}"
39+
GITHUB_TOKEN: "${{ inputs.github_token }}"
40+
shell: bash
41+
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch or minor update**"
4042
- name: Approve major updates of development dependencies
4143
if: ${{ (steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' && steps.dependabot-metadata.outputs.dependency-type == 'direct:development') && (github.event.pull_request.user.login == inputs.required-pr-user-login) }}
42-
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a major update of a dependency used only in development**"
4344
env:
44-
PR_URL: ${{github.event.pull_request.html_url}}
45-
GITHUB_TOKEN: ${{ inputs.github_token }}
45+
PR_URL: "${{ github.event.pull_request.html_url }}"
46+
GITHUB_TOKEN: "${{ inputs.github_token }}"
47+
shell: bash
48+
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a major update of a dependency used only in development**"
4649
- name: Comment on major updates of non-development dependencies
4750
if: ${{ (steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' && steps.dependabot-metadata.outputs.dependency-type == 'direct:production') && (github.event.pull_request.user.login == inputs.required-pr-user-login) }}
51+
env:
52+
PR_URL: "${{ github.event.pull_request.html_url }}"
53+
GITHUB_TOKEN: "${{ inputs.github_token }}"
54+
shell: bash
4855
run: |
4956
gh pr comment $PR_URL --body "I'm **not approving** this PR because **it includes a major update of a dependency used in production**"
5057
gh pr edit $PR_URL --add-label "requires-manual-qa"
51-
env:
52-
PR_URL: ${{ github.event.pull_request.html_url }}
53-
GITHUB_TOKEN: ${{ inputs.github_token }}

0 commit comments

Comments
 (0)