Update kobocollect_on_android_latest.md #107
Workflow file for this run
This file contains hidden or 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
name: Dependabot automerge | |
on: pull_request_target | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
test-build: | |
uses: ./.github/workflows/test-build.yml | |
# Avoid running this on different PRs | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
review-dependabot-pr: | |
runs-on: ubuntu-latest | |
needs: | |
- test-build | |
if: | | |
${{ github.event.pull_request.user.login == 'dependabot[bot]' }} && | |
!failure() && | |
needs.test-build.result == 'success' | |
outputs: | |
pr-url: ${{ github.event.pull_request.html_url }} | |
steps: | |
- name: Dependabot metadata | |
id: dependabot-metadata | |
uses: dependabot/[email protected] | |
- name: Enable auto-merge for Dependabot PRs of patch and minor updates | |
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'}} | |
# This requires auto-merge to be enabled in GitHub repo settings | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Approve patch and minor updates | |
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'}} | |
run: | | |
gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch or minor update**" | |
gh pr edit $PR_URL --add-label "automerge" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
on-failure: | |
if: | | |
failure() || | |
(needs.test-build.result == 'failure' || needs.test-build.result == 'timed_out') | |
needs: | |
- test-build | |
- review-dependabot-pr | |
uses: './.github/workflows/zulip.yml' | |
secrets: inherit | |
with: | |
topic: "Github Actions (dependabot)" | |
content: ":boom: @*frontend*, ${{github.repository}} [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) failed to auto-merge [a dependabot PR](${{needs.review-dependabot-pr.outputs.pr-url}}). Please review." |