[DEVOPS-XXX] Use new v6 version of deploy B2C policy action #61
Workflow file for this run
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: Dependabot Automations | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
workflow_call: | |
inputs: | |
autoApprove: | |
default: false | |
type: boolean | |
autoMerge: | |
default: false | |
type: boolean | |
jobs: | |
dependabot-automations: | |
name: Dependabot Automations | |
runs-on: ubuntu-latest | |
if: ${{ inputs.autoApprove || inputs.autoMerge }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# The approval step will fail if there's no metadata. | |
- name: Retrieve dependabot metadata | |
id: dependabot-metadata | |
uses: dependabot/fetch-metadata@v1 | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Approve PR | |
uses: hmarr/auto-approve-action@v3.2.1 | |
if: ${{ inputs.autoApprove }} | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Enable auto-merge | |
if: ${{ inputs.autoMerge && steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }} | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |