Revert "Try running on the HEAD SHA instead of the merge in hopes of simplicity"

This reverts commit 70b407174b.
This commit is contained in:
Jordan Dominion
2024-08-16 22:33:59 -04:00
parent 99b319f97f
commit f9667a2801
3 changed files with 149 additions and 41 deletions
+10 -16
View File
@@ -74,7 +74,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Restore
run: dotnet restore
@@ -82,22 +82,14 @@ jobs:
- name: Build ReleaseNotes
run: dotnet publish -c Release -p:TGS_HOST_NO_WEBPANEL=true -o release_notes_bins tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
path: merge_workspace
- name: Read Current SHA # Can't rely on github.sha as it's for the base branch
id: get-pr-sha
run: |
cd merge_workspace
echo "merge_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
run: echo "head_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Generate Temporary Branch to Reference Head
- name: Generate Temporary Branch to Reference Merge
run: |
git checkout -b ${{ github.event.pull_request.number }}-head
git push -f -u origin ${{ github.event.pull_request.number }}-head
git checkout -b ${{ github.event.pull_request.number }}-merge
git push -f -u origin ${{ github.event.pull_request.number }}-merge
- name: Send Workflow Dispatch
uses: lasith-kg/dispatch-workflow@5623bf13f09bbbbdb549ec692b070307f39b66ac #v2.0.0 + setup_node@v4
@@ -106,15 +98,17 @@ jobs:
dispatch-method: workflow_dispatch
owner: ${{ github.repository_owner }}
repo: ${{ github.event.pull_request.base.repo.name }}
ref: ${{ github.event.pull_request.number }}-head
ref: ${{ github.event.pull_request.number }}-merge
workflow: ci-pipeline.yml
token: ${{ github.token }}
workflow-inputs: |
{
"pull_request_number": "${{ github.event.pull_request.number }}"
"pull_request_merge_sha": "${{ steps.get-pr-sha.outputs.merge_sha }}"
}
- name: Set CI Check Run (Pending)
run: dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll --ci-check ${{ steps.get-pr-sha.outputs.head_sha }} ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} Pending ${{ steps.dispatch.outputs.run-id }}
- name: Delete Temporary Branch
if: always()
run: git push -d origin ${{ github.event.pull_request.number }}-head
run: git push -d origin ${{ github.event.pull_request.number }}-merge