From 57aa34ee6882b6118eca4d21da0f4abfcd84982a Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 15 Jul 2024 17:34:01 -0400 Subject: [PATCH] Stable merge using GitHub App --- .github/workflows/stable-merge.yml | 35 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stable-merge.yml b/.github/workflows/stable-merge.yml index 05299e6284..6df3e94631 100644 --- a/.github/workflows/stable-merge.yml +++ b/.github/workflows/stable-merge.yml @@ -6,18 +6,41 @@ on: - master workflow_dispatch: -env: - DEV_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} - jobs: master-merge: + name: Master Merge runs-on: ubuntu-latest steps: - - name: Checkout + - name: Build Checkout + uses: actions/checkout@v4 + with: + path: temp_workspace + + - name: Restore + run: | + cd temp_workspace + dotnet restore + + - name: Build ReleaseNotes + run: | + cd temp_workspace + dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: Run ReleaseNotes Create CI Completion Check + run: | + cd temp_workspace + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + + - name: Load Installation Token into Envvar + run: | + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + + - name: Main Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.DEV_PUSH_TOKEN }} + token: ${{ env.INSTALLATION_TOKEN }} - name: Merge master into dev uses: robotology/gh-action-nightly-merge@14b4a4cf358f7479aa708bee05cf8a794d6a2516 #v1.5.0 @@ -28,6 +51,6 @@ jobs: allow_forks: true user_name: tgstation-server user_email: tgstation-server@users.noreply.github.com - push_token: DEV_PUSH_TOKEN + push_token: INSTALLATION_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}