diff --git a/.github/workflows/fast-forward.yaml b/.github/workflows/fast-forward.yaml index 11ed8bde9..4c0c9896a 100644 --- a/.github/workflows/fast-forward.yaml +++ b/.github/workflows/fast-forward.yaml @@ -30,16 +30,21 @@ jobs: # ${{ steps.branch.outputs.target }} == "moonray/main", "moonray/release-1.30" id: branch run: | - NAME=${${{ github.ref }}#refs/heads/} # strip off refs/heads/ if it exists + REF="${{ github.ref }}" + NAME="${REF#refs/heads/}" # strip off refs/heads/ if it exists echo "upstream=$NAME" >> "$GITHUB_OUTPUT" echo "target=${{ matrix.patch }}/$NAME" >> "$GITHUB_OUTPUT" - name: Checkout uses: actions/checkout@v4 with: - ref: "${{ steps.branch.outputs.target }}" ssh-key: ${{ secrets.DEPLOY_KEY_TO_UPDATE_STRICT_BRANCH }} + - name: Checkout branches + run: | + git checkout ${{ steps.branch.outputs.upstream }} + git checkout ${{ steps.branch.outputs.target }} - name: Merge ${{ steps.branch.outputs.upstream }} into ${{ steps.branch.outputs.target }} run: | + git checkout ${{ steps.branch.outputs.target }} git merge origin/${{ steps.branch.outputs.upstream }} -m "Auto-merge ${{ steps.branch.outputs.upstream }}" - name: Create pull request uses: peter-evans/create-pull-request@v6