Skip to content

chore: Fisherman network deployments #2072

chore: Fisherman network deployments

chore: Fisherman network deployments #2072

name: Merge-Train Recreate
on:
pull_request:
types: [closed]
jobs:
recreate:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'merge-train/')) }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --global user.name "AztecBot"
git config --global user.email "[email protected]"
- name: Recreate branch
run: |
MERGE_TRAIN_BRANCH="${{ github.event.pull_request.head.ref }}"
BASE_BRANCH="${{ github.event.pull_request.base.ref }}"
git fetch origin "$BASE_BRANCH"
git checkout -b "$MERGE_TRAIN_BRANCH" "origin/$BASE_BRANCH"
- name: Push branch
continue-on-error: true
run: |
# This will generally only succeed if the branch does not exist, as a fallback if the branch is unprotected and gets deleted.
git push origin "$MERGE_TRAIN_BRANCH"