Bump .rogue-master-firmware from e8d7a30
to 128a6e7
#67
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
name: Dependabot Approve and Merge | |
on: pull_request_target | |
permissions: | |
pull-requests: write | |
contents: write | |
issues: write | |
jobs: | |
dependabot: | |
name: Auto approve and merge | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Fetch update types | |
id: update-types | |
env: | |
UPDATE_TYPES: ${{ secrets.UPDATE_TYPES }} | |
run: | | |
arr=(${UPDATE_TYPES//;/ }) | |
count=${#arr[@]} | |
echo "Types: ${arr[*]}" | |
echo "Count: ${count}" | |
echo "types=${arr[*]}" >> $GITHUB_OUTPUT | |
echo "count=${count}" >> $GITHUB_OUTPUT | |
- name: Fetch Dependabot metadata | |
if: ${{ fromJson(steps.update-types.outputs.count) > 0 }} | |
id: dependabot-metadata | |
uses: dependabot/fetch-metadata@v1.6.0 | |
- name: Approve and merge | |
id: auto-merge | |
if: ${{ fromJson(steps.update-types.outputs.count) > 0 && contains(steps.update-types.outputs.types, steps.dependabot-metadata.outputs.update-type) }} | |
run: | | |
gh pr edit "$PR_URL" --add-label "auto-merged" | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --squash "$PR_URL" | |
echo "STATUS=true" >> $GITHUB_OUTPUT | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Write summary | |
run: | | |
result="skip. :x:" | |
if [ "${STATUS}" == "true" ]; then | |
result=" auto-merge! :white_check_mark:" | |
fi | |
echo "### Done with ${result}" >> $GITHUB_STEP_SUMMARY | |
env: | |
STATUS: ${{ steps.auto-merge.outputs.STATUS }} |