MLH-1523 add classifications attributes to internalAttributes (#5582) #206
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: Merge master into a target branch (on-demand) | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| target_branch: | ||
| description: "Branch to merge master into" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - staging | ||
| - beta | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| jobs: | ||
| merge-master-into-branch: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Configure Git | ||
| run: | | ||
| git config user.name "GitHub Actions" | ||
| git config user.email "[email protected]" | ||
| - name: Fetch branches | ||
| run: git fetch origin | ||
| - name: Prepare merge branch | ||
| run: | | ||
| BRANCH=merge-master-into-${{ github.event.inputs.target_branch }} | ||
| git branch -D $BRANCH 2>/dev/null || true | ||
| git checkout -b $BRANCH origin/${{ github.event.inputs.target_branch }} | ||
| git merge origin/master --no-edit || true | ||
| - name: Check for merge conflicts | ||
| id: conflict_check | ||
| run: | | ||
| if git ls-files -u | grep .; then | ||
| echo "conflicts=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "conflicts=false" >> $GITHUB_OUTPUT | ||
| fi | ||
| - name: Push or create PR | ||
| uses: peter-evans/create-pull-request@v6 | ||
| with: | ||
| base: ${{ github.event.inputs.target_branch }} | ||
| branch: merge-master-into-${{ github.event.inputs.target_branch }} | ||
| branch-suffix: timestamp | ||
| title: ${{ steps.conflict_check.outputs.conflicts == 'true' && '⚠️ Conflicts detected merging master → ' || '✅ Auto-merge: master → ' }}${{ github.event.inputs.target_branch }} | ||
| commit-message: "Merge master into ${{ github.event.inputs.target_branch }}" | ||
| body: | | ||
| Automated merge from master to ${{ github.event.inputs.target_branch }}. | ||
| Conflicts detected: ${{ steps.conflict_check.outputs.conflicts }}. | ||
| Please resolve manually if true. | ||
| delete-branch: true | ||