automerge 1024pix/pix/10946 #173
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: automerge | |
run-name: automerge ${{ inputs.pullRequest }} | |
on: | |
workflow_dispatch: | |
inputs: | |
pullRequest: | |
description: 'Pull request préfixé par le nom du repo : ex : 1024pix/pix/42' | |
required: true | |
merge_labels: | |
type: string | |
default: ':rocket: Ready to Merge,!:warning: Blocked,!:earth_africa: i18n needed,!:busts_in_silhouette: Panel Review Needed,!Development in progress,!:eyes: Design Review Needed,!:eyes: Func Review Needed,!:eyes: Tech Review Needed' | |
merge_commit_message: | |
type: string | |
default: "{pullRequest.title} \n\n #{pullRequest.number}" | |
update_labels: | |
type: string | |
default: ':rocket: Ready to Merge' | |
update_method: | |
type: string | |
default: rebase | |
merge_forks: | |
type: string | |
default: 'false' | |
jobs: | |
automerge-dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: automerge | |
id: automerge | |
uses: pascalgn/[email protected] | |
env: | |
GITHUB_TOKEN: '${{ secrets.PIX_SERVICE_ACTIONS_TOKEN }}' | |
MERGE_LABELS: '${{ inputs.merge_labels }}' | |
MERGE_COMMIT_MESSAGE: '${{ inputs.merge_commit_message }}' | |
UPDATE_LABELS: '${{ inputs.update_labels }}' | |
UPDATE_METHOD: '${{ inputs.update_method }}' | |
MERGE_FORKS: '${{ inputs.merge_forks }}' | |
PULL_REQUEST: '${{ inputs.pullRequest }}' | |
MERGE_RETRIES: "40" | |
MERGE_RETRY_SLEEP: "30000" | |
- name: Call Pix Bot | |
if: ${{ steps.automerge.outputs.mergeResult != 'merged' || steps.automerge.outcome != 'success' }} | |
run: | | |
curl ${{ secrets.PIX_BOT_URL }}/merge?status=failure -d '{"pullRequest": "${{ inputs.pullRequest }}" }' -H 'Authorization: Bearer ${{ secrets.PIX_BOT_TOKEN }}' -H 'Content-type: application/json' | |