diff --git a/.github/workflows/promote-branch.yml b/.github/workflows/promote-branch.yml index 645d712c..54296d35 100644 --- a/.github/workflows/promote-branch.yml +++ b/.github/workflows/promote-branch.yml @@ -206,13 +206,12 @@ jobs: dotnet-version: ${{ env.dotnet-sdk-version }} - name: 'Create target branch' if: ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }} + env: + base-branch: ${{ needs.workflow-variables.outputs.base-branch }} + target-branch: ${{ needs.workflow-variables.outputs.target-branch }} run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" git fetch origin - git switch ${{ needs.workflow-variables.outputs.base-branch }} - git checkout -b ${{ needs.workflow-variables.outputs.target-branch }} origin/${{ needs.workflow-variables.outputs.target-branch }} || git checkout -b ${{ needs.workflow-variables.outputs.target-branch }} - git push --set-upstream origin ${{ needs.workflow-variables.outputs.target-branch }} + git push origin origin/${{ env.base-branch }}:refs/heads/${{ env.target-branch }} - name: 'Lock target branch' if: ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }} uses: './.github/actions/github/branch-protection/lock' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cde39549..78cdb35b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,6 @@ permissions: pages: write id-token: write contents: write - administration: write concurrency: group: release-${{ github.head_ref || github.ref }}