Auto-update: defaults-o2.sh o2pdpsuite.sh o2physics.sh o2.sh o2dpg.sh #2992
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: Create a PR from pushes to rc/branches | |
'on': | |
push: | |
branches: | |
# All branches listed here must have a branch protection rule restricting | |
# who can push to them, as PRs will be created with auto-merge enabled! | |
- rc/master | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.deleted }} | |
steps: | |
- name: Get rc branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Compute base branch name | |
id: name | |
run: | | |
echo "base=${GITHUB_REF#refs/heads/rc/}" >> "$GITHUB_OUTPUT" | |
- name: Send pull request to regular branch | |
uses: repo-sync/pull-request@v2 | |
id: open_pr | |
with: | |
destination_branch: ${{ steps.name.outputs.base }} | |
pr_title: 'daily tags: auto-update dist definitions' | |
pr_body: >- | |
The daily-tags.sh script has created a tag release with these | |
changes. | |
pr_allow_empty: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable auto-merge for newly-created pull request | |
# If the PR already exists, we won't get the number | |
# (and we probably shouldn't toggle auto-merge anyway). | |
if: steps.open_pr.outputs.pr_number | |
run: gh pr merge --squash --auto ${{ steps.open_pr.outputs.pr_number }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |