Skip to content

build(deps): Bump actions/cache from 3.3.3 to 4.0.2 #133

build(deps): Bump actions/cache from 3.3.3 to 4.0.2

build(deps): Bump actions/cache from 3.3.3 to 4.0.2 #133

# https://blog.somewhatabstract.com/2021/10/11/setting-up-dependabot-with-github-actions-to-approve-and-merge/
name: Dependabot Pull Request Approve and Merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
nope:
name: nope
runs-on: ubuntu-latest
steps:
- name: Echo
run: |
echo ...
dependabot:
runs-on: ubuntu-latest
needs: [test]

Check failure on line 23 in .github/workflows/dependabot-approve-and-auto-merge.yml

View workflow run for this annotation

GitHub Actions / Dependabot Pull Request Approve and Merge

Invalid workflow file

The workflow is not valid. .github/workflows/dependabot-approve-and-auto-merge.yml (Line: 23, Col: 13): Job 'dependabot' depends on unknown job 'test'.
# Checking the actor will prevent your Action run failing on non-Dependabot
# PRs but also ensures that it only does work for Dependabot PRs.
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
# This first step will fail if there's no metadata and so the approval
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Here the PR gets approved.
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Finally, this sets the PR to allow auto-merging for patch and minor
# updates if all checks pass
- name: Enable auto-merge for Dependabot PRs
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(steps.metadata.outputs.dependency-names, 'spring-boot-starter-parent') && 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 }}