Skip to content

[DEVOPS-280] Upgrade prettier action #75

[DEVOPS-280] Upgrade prettier action

[DEVOPS-280] Upgrade prettier action #75

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}}