mirror of
https://github.com/sartography/spiffworkflow-frontend.git
synced 2025-02-24 12:18:17 +00:00
44 lines
1.8 KiB
YAML
44 lines
1.8 KiB
YAML
name: Dependabot auto-merge
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Tests"]
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
dependabot:
|
|
runs-on: ubuntu-latest
|
|
# if: ${{ github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' && github.event_name == 'pull_request' }}
|
|
# if: ${{ github.event_name == 'pull_request' }}
|
|
steps:
|
|
- name: Log github metadata
|
|
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
|
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest')}}
|
|
# ideally we auto-merge if all checks pass
|
|
run: |
|
|
echo about to log stuff
|
|
echo actor: ${{ github.actor }}
|
|
echo conclusion: ${{ github.event.workflow_run.conclusion }}
|
|
echo event_name: ${{ github.event_name }}
|
|
echo pr_url: ${{ github.event.pull_request.html_url }}
|
|
echo and going to next step where it should auto merge
|
|
env:
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
- name: Dependabot metadata
|
|
id: metadata
|
|
uses: dependabot/fetch-metadata@v1.3.1
|
|
with:
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
- name: Enable auto-merge for Dependabot PRs
|
|
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
|
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest')}}
|
|
# ideally we auto-merge if all checks pass
|
|
run: gh pr merge --auto --merge "$PR_URL"
|
|
env:
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|