From 0116a2ae1d3fba7d2deb751dd13dfe08f1029da0 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 11 Aug 2024 07:49:47 -0400 Subject: [PATCH] Add spacestation13 fork sync --- .github/workflows/update-ss13-org-mirror.yml | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/update-ss13-org-mirror.yml diff --git a/.github/workflows/update-ss13-org-mirror.yml b/.github/workflows/update-ss13-org-mirror.yml new file mode 100644 index 0000000000..e8dabd987e --- /dev/null +++ b/.github/workflows/update-ss13-org-mirror.yml @@ -0,0 +1,51 @@ +name: 'Sync spacestation13/tgstation-server' + +on: + push: + branches: + - dev + tags: + - '*' + workflow_dispatch: + +env: + TGS_DOTNET_VERSION: 8 + TGS_DOTNET_QUALITY: ga + +jobs: + fork-sync: + name: Fork Sync + runs-on: ubuntu-latest + steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' + dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Restore + run: dotnet restore + + - name: Build ReleaseNotes + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: Generate App Token + run: | + 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 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + env: + TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + + - name: Push to Spacestation13 Fork + run: | + git config user.name "tgstation-server-ci[bot]" + git config user.email "161980869+tgstation-server-ci[bot]@users.noreply.github.com" + git push "https://tgstation-server-ci:${{ env.INSTALLATION_TOKEN }}@github.com/spacestation13/tgstation-server" + git push --tags "https://tgstation-server-ci:${{ env.INSTALLATION_TOKEN }}@github.com/spacestation13/tgstation-server"