linting and lighthouse checks added #40
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
# | |
# Auto Merge Dependabot PRs | |
# | |
name: Auto Merge | |
# Controls when the action will run. | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.workflow }}_${{ github.event_name }}_${{ github.head_ref || github.ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
dependabot: | |
name: '🤖 Dependabot Automation' | |
runs-on: [self-hosted, linux] | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v2 | |
with: | |
github-token: '${{ secrets.GITHUB_TOKEN }}' | |
- name: Enable auto-merge for Dependabot PRs | |
continue-on-error: true | |
if: ${{contains(steps.metadata.outputs.dependency-names, '') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}} | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} # GH_TOKEN needed to trigger follow up worlflow: https://github.com/fastify/github-action-merge-dependabot/issues/134 | |
- name: Approve a PR | |
continue-on-error: true | |
# Auto approve all dependencies with patch or minor version updates | |
if: ${{(steps.metadata.outputs.update-type == 'version-update:semver-patch') || (steps.metadata.outputs.update-type == 'version-update:semver-minor')}} | |
run: gh pr review --approve "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} # GH_TOKEN needed to approve PR as code owner on protected branches |