Skip to content

Bump actions/checkout from 4 to 6 #5

Bump actions/checkout from 4 to 6

Bump actions/checkout from 4 to 6 #5

Workflow file for this run

name: "Dependabot"
on:
pull_request_target:
workflow_call:
inputs:
debug:
type: boolean
required: false
default: false
jobs:
coditory-dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
permissions:
pull-requests: write
contents: write
steps:
- name: Context
if: inputs.debug
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup reviewer bot token
uses: actions/create-github-app-token@v1
id: bot
with:
app-id: ${{ secrets.REVIEWER_BOT_APP_ID }}
private-key: ${{ secrets.REVIEWER_BOT_PRIVATE_KEY }}
- name: Enable PR auto-merge
id: pr
if: steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ steps.bot.outputs.token }}
run: gh pr merge --auto --rebase "$PR_URL"
- name: Approve PR
if: steps.pr.conclusion == 'success'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ steps.bot.outputs.token }}
DEPENDENCY: ${{ steps.dependabot-metadata.outputs.dependency-names }}
PREV_VERSION: ${{ steps.dependabot-metadata.outputs.previous-version }}
NEW_VERSION: ${{ steps.dependabot-metadata.outputs.new-version }}
run: echo -e "Pull request is **auto approved** because **it includes a non-major update**\n$DEPENDENCY $PREV_VERSION -> $NEW_VERSION" | gh pr review $PR_URL --approve --body-file -