Repository navigation
개선(deps): Bump dompurify from 3.4.16 to 3.5.0 #380
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 Python Auto Merge | ||
|
Check warning on line 1 in .github/workflows/dependabotAutoMerge.yml
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| workflow_run: | ||
| workflows: [CI Fast, CodeQL, Policy Check] | ||
| types: [completed] | ||
| permissions: | ||
| actions: read | ||
| checks: read | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
| jobs: | ||
| classify: | ||
| if: github.event_name == 'pull_request_target' && github.event.pull_request.user.login == 'dependabot[bot]' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - id: metadata | ||
| uses: dependabot/fetch-metadata@v2 | ||
| - id: policy | ||
| continue-on-error: true | ||
| env: | ||
| POLICY_ACTOR: ${{ github.actor }} | ||
| POLICY_AUTHOR: ${{ github.event.pull_request.user.login }} | ||
| POLICY_ECOSYSTEM: ${{ steps.metadata.outputs.package-ecosystem }} | ||
| POLICY_UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }} | ||
| POLICY_BASE_REF: ${{ github.event.pull_request.base.ref }} | ||
| POLICY_DRAFT: ${{ github.event.pull_request.draft }} | ||
| POLICY_TITLE: ${{ github.event.pull_request.title }} | ||
| POLICY_MAINTAINER_CHANGES: ${{ steps.metadata.outputs.maintainer-changes }} | ||
| run: | | ||
| python -X utf8 .github/scripts/dependabotPolicy.py classify \ | ||
| --actor "$POLICY_ACTOR" \ | ||
| --author "$POLICY_AUTHOR" \ | ||
| --ecosystem "$POLICY_ECOSYSTEM" \ | ||
| --update-type "$POLICY_UPDATE_TYPE" \ | ||
| --base-ref "$POLICY_BASE_REF" \ | ||
| --draft "$POLICY_DRAFT" \ | ||
| --title "$POLICY_TITLE" \ | ||
| --maintainer-changes "$POLICY_MAINTAINER_CHANGES" | ||
| - name: Mark safe candidate | ||
| if: steps.policy.outputs.allowed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| run: | | ||
| gh label create dependabot-python-auto-merge \ | ||
| --color 0E8A16 \ | ||
| --description "CI green 뒤 Python patch와 minor만 자동 병합" \ | ||
| --force | ||
| gh pr edit "$PR_URL" --add-label dependabot-python-auto-merge | ||
| - name: Clear unsafe candidate | ||
| if: steps.policy.outputs.allowed != 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| run: gh pr edit "$PR_URL" --remove-label dependabot-python-auto-merge || true | ||
| merge: | ||
| if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: dependabot-auto-merge-${{ github.event.workflow_run.head_sha }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - id: candidate | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
| run: | | ||
| if [ -z "$PR_NUMBER" ]; then | ||
| echo "allowed=false" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| allowed=$(gh pr view "$PR_NUMBER" \ | ||
| --json author,baseRefName,isDraft,labels,state,title \ | ||
| --jq '(.author.login == "app/dependabot") and (.baseRefName == "master") and (.isDraft == false) and (.state == "OPEN") and ((.title | startswith("[CORELOOP-")) | not) and ([.labels[].name] | contains(["dependabot-python-auto-merge"]))') | ||
| echo "allowed=$allowed" >> "$GITHUB_OUTPUT" | ||
| echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT" | ||
| - id: checks | ||
| if: steps.candidate.outputs.allowed == 'true' | ||
| continue-on-error: true | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ steps.candidate.outputs.number }} | ||
| run: | | ||
| gh pr checks "$PR_NUMBER" --json bucket,name,workflow > "$RUNNER_TEMP/dependabot-checks.json" | ||
| python -X utf8 .github/scripts/dependabotPolicy.py checks \ | ||
| --checks-file "$RUNNER_TEMP/dependabot-checks.json" | ||
| - name: Merge verified update | ||
| if: steps.candidate.outputs.allowed == 'true' && steps.checks.outputs.allowed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ steps.candidate.outputs.number }} | ||
| run: gh pr merge "$PR_NUMBER" --squash --delete-branch | ||