Skip to content

Commit cbdbaa4

Browse files
authored
Merge pull request #1887 from tgstation/PostReleaseThings [TGSDeploy]
Mostly just CI improvements
2 parents c3672c2 + 55208b4 commit cbdbaa4

File tree

9 files changed

+123
-70
lines changed

9 files changed

+123
-70
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
22
version: 2
33
updates:
4-
- package-ecosystem: "nuget"
5-
directory: "/"
4+
- package-ecosystem: nuget
5+
directory: /
66
schedule:
7-
interval: "daily"
7+
interval: daily
88
labels:
9-
- "Dependencies"
9+
- Dependencies
1010
open-pull-requests-limit: 100
11+
- package-ecosystem: github-actions
12+
directory: "/"
13+
target-branch: master
14+
schedule:
15+
interval: daily
16+
labels:
17+
- Dependencies
18+
- CI/CD

.github/workflows/ci-pipeline.yml

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
ref: "refs/pull/${{ inputs.pull_request_number }}/merge"
6969

70-
- name: Build ReleaseNotes
70+
- name: Build ReleaseNotes # Name checked in rerunFlakyTests.js
7171
run: dotnet publish -c Release -p:TGS_HOST_NO_WEBPANEL=true -o release_notes_bins tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
7272

7373
- name: Store ReleaseNotes Binaries
@@ -108,7 +108,7 @@ jobs:
108108
- name: Setup Telemetry Key File
109109
run: echo "fake_telemetry_key" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
110110

111-
- name: Build
111+
- name: Build # Name checked in rerunFlakyTests.js
112112
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
113113

114114
- name: Perform CodeQL Analysis
@@ -124,7 +124,7 @@ jobs:
124124
byond: [ '510.1346', '511.1385', '512.1488', '513.1542', '514.1589', 'EDGE' ]
125125
runs-on: ubuntu-latest
126126
steps:
127-
- name: Install x86 libc Dependencies
127+
- name: Install Native x86 libc Dependencies # Name checked in rerunFlakyTests.js
128128
run: |
129129
sudo dpkg --add-architecture i386
130130
sudo apt-get update
@@ -137,7 +137,7 @@ jobs:
137137
path: ~/byond-zips-cache
138138
key: byond-zips
139139

140-
- name: Build BYOND Cache if Necessary and Install
140+
- name: Setup BYOND Cache if Necessary and Install
141141
run: |
142142
echo "Setting up BYOND."
143143
FULL_VERSION=${{ matrix.byond }}
@@ -184,7 +184,7 @@ jobs:
184184
run: echo "head_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
185185

186186

187-
- name: Build DMAPI Test Project
187+
- name: Compile DMAPI Test Project
188188
run: |
189189
set -e
190190
retval=1
@@ -244,17 +244,17 @@ jobs:
244244
git checkout ${{ matrix.committish }}
245245
git submodule update --init --recursive
246246
247-
- name: Build OpenDream
247+
- name: Build OpenDream # Name checked in rerunFlakyTests.js
248248
run: |
249249
cd $HOME/OpenDream/OpenDreamPackageTool
250250
dotnet build -c Release --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly
251251
252-
- name: Create TGS Deployment
252+
- name: Build TGS Deployment # Name checked in rerunFlakyTests.js
253253
run: |
254254
cd $HOME/OpenDream
255255
dotnet run -c Release --project OpenDreamPackageTool --no-build -- --tgs -o tgs_deploy
256256
257-
- name: Build DMAPI
257+
- name: Compile DMAPI Test Project
258258
run: |
259259
cd tests/DMAPI/BasicOperation
260260
$HOME/OpenDream/tgs_deploy/bin/compiler/DMCompiler --verbose --notices-enabled "basic operation_test.dme"
@@ -345,7 +345,7 @@ jobs:
345345
name: release_notes_bins
346346
path: release_notes_bins
347347

348-
- name: Build Changelog (Incremental)
348+
- name: Compile Changelog (Incremental)
349349
run: |
350350
mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null
351351
dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll --generate-full-notes
@@ -410,7 +410,7 @@ jobs:
410410
shell: bash
411411
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
412412

413-
- name: Build Docker Image
413+
- name: Build Docker Image # Name checked in rerunFlakyTests.js
414414
run: docker build . -f build/Dockerfile --build-arg TGS_TELEMETRY_KEY_FILE=${{ env.TGS_TELEMETRY_KEY_FILE }}
415415

416416
- name: Delete Telemetry Key File
@@ -429,7 +429,7 @@ jobs:
429429
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
430430
runs-on: ubuntu-latest
431431
steps:
432-
- name: Install x86 libc Dependencies
432+
- name: Install Native x86 libc Dependencies # Name checked in rerunFlakyTests.js
433433
run: |
434434
sudo dpkg --add-architecture i386
435435
sudo apt-get update
@@ -462,7 +462,7 @@ jobs:
462462
- name: Setup Telemetry Key File
463463
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
464464

465-
- name: Build
465+
- name: Build # Name checked in rerunFlakyTests.js
466466
run: dotnet build -c ${{ matrix.configuration }}NoWindows
467467

468468
- name: Delete Telemetry Key File
@@ -525,7 +525,7 @@ jobs:
525525
shell: bash
526526
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
527527

528-
- name: Build
528+
- name: Build # Name checked in rerunFlakyTests.js
529529
run: dotnet build -c ${{ matrix.configuration }}NoWix
530530

531531
- name: Delete Telemetry Key File
@@ -656,7 +656,7 @@ jobs:
656656
shell: bash
657657
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
658658

659-
- name: Build
659+
- name: Build # Name checked in rerunFlakyTests.js
660660
run: dotnet build -c ${{ matrix.configuration }} tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj
661661

662662
- name: Delete Telemetry Key File
@@ -820,7 +820,7 @@ jobs:
820820
- name: Disable ptrace_scope
821821
run: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
822822

823-
- name: Install Native Dependencies
823+
- name: Install Native Dependencies # Name checked in rerunFlakyTests.js
824824
run: |
825825
sudo dpkg --add-architecture i386
826826
sudo apt-get update
@@ -876,7 +876,7 @@ jobs:
876876
- name: Setup Telemetry Key File
877877
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
878878

879-
- name: Build
879+
- name: Build # Name checked in rerunFlakyTests.js
880880
run: dotnet build -c ${{ matrix.configuration }}NoWindows tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj
881881

882882
- name: Delete Telemetry Key File
@@ -1224,24 +1224,25 @@ jobs:
12241224

12251225
build-deb:
12261226
name: Build .deb Package # Can't do i386 due to https://github.com/dotnet/core/issues/4595
1227+
needs: build-releasenotes
12271228
runs-on: ubuntu-latest
12281229
env:
12291230
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
12301231
steps:
1231-
- name: Install Native Dependencies
1232+
- name: Install Native Dependencies # Name checked in rerunFlakyTests.js
12321233
run: |
12331234
sudo dpkg --add-architecture i386
12341235
sudo apt-get update
12351236
sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386
12361237
12371238
- name: Import GPG Key
1238-
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))
1239+
if: github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master'
12391240
run: |
12401241
echo "${{ secrets.PACKAGING_PRIVATE_KEY }}" > private.pgp
12411242
echo ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }} | gpg --batch --yes --passphrase-fd 0 --import private.pgp
12421243
rm private.pgp
12431244
1244-
- name: Install dotnet-sdk system package
1245+
- name: Install Native dotnet-sdk Package # Name checked in rerunFlakyTests.js
12451246
if: (!contains(env.TGS_DOTNET_QUALITY, 'preview'))
12461247
run: |
12471248
sudo apt-get update
@@ -1276,13 +1277,22 @@ jobs:
12761277
- name: Setup Telemetry Key File
12771278
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
12781279

1280+
- name: Retrieve ReleaseNotes Binaries
1281+
uses: actions/download-artifact@v4
1282+
with:
1283+
name: release_notes_bins
1284+
path: release_notes_bins
1285+
12791286
- name: Execute Build Script (Unsigned)
12801287
if: (!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master'))
1288+
env:
1289+
RELEASE_NOTES_DLL_PATH: ${{ github.workspace }}/release_notes_bins/Tgstation.Server.ReleaseNotes.dll
12811290
run: sudo -E build/package/deb/build_package.sh
12821291

12831292
- name: Execute Build Script (Signed)
12841293
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master')
12851294
env:
1295+
RELEASE_NOTES_DLL_PATH: ${{ github.workspace }}/release_notes_bins/Tgstation.Server.ReleaseNotes.dll
12861296
PACKAGING_KEYGRIP: ${{ vars.PACKAGING_KEYGRIP }}
12871297
run: sudo -E build/package/deb/build_package.sh
12881298

@@ -1383,22 +1393,22 @@ jobs:
13831393
shell: bash
13841394
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
13851395

1386-
- name: Build Host
1396+
- name: Build Host # Name checked in rerunFlakyTests.js
13871397
run: dotnet build -c Release src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
13881398

13891399
- name: Delete Telemetry Key File
13901400
shell: bash
13911401
if: always()
13921402
run: rm -f ${{ env.TGS_TELEMETRY_KEY_FILE }}
13931403

1394-
- name: Build Service
1404+
- name: Build Service # Name checked in rerunFlakyTests.js
13951405
run: dotnet build -c Release src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj
13961406

13971407
- name: Prepare Artifacts
13981408
shell: powershell
13991409
run: build/package/winget/prepare_installer_input_artifacts.ps1
14001410

1401-
- name: Build Installer .exe
1411+
- name: Build Installer .exe # Name checked in rerunFlakyTests.js
14021412
run: |
14031413
cd build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle
14041414
dotnet build -c Release
@@ -1789,22 +1799,23 @@ jobs:
17891799
shell: bash
17901800
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
17911801

1792-
- name: Build Host # We need to rebuild the installer.exe so it can be properly signed
1802+
# We need to rebuild the installer.exe so it can be properly signed
1803+
- name: Build Host # Name checked in rerunFlakyTests.js
17931804
run: dotnet build -c Release src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
17941805

17951806
- name: Delete Telemetry Key File
17961807
shell: bash
17971808
if: always()
17981809
run: rm -f ${{ env.TGS_TELEMETRY_KEY_FILE }}
17991810

1800-
- name: Build Service
1811+
- name: Build Service # Name checked in rerunFlakyTests.js
18011812
run: dotnet build -c Release src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj
18021813

18031814
- name: Prepare Artifacts
18041815
shell: powershell
18051816
run: build/package/winget/prepare_installer_input_artifacts.ps1
18061817

1807-
- name: Build Installer .exe
1818+
- name: Build Installer .exe # Name checked in rerunFlakyTests.js
18081819
run: |
18091820
cd build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle
18101821
dotnet build -c Release
@@ -1995,6 +2006,7 @@ jobs:
19952006
changelog-regen:
19962007
name: Regenerate Changelog
19972008
runs-on: ubuntu-latest
2009+
if: (!(cancelled() || failure())) && needs.deploy-tgs.result == 'success'
19982010
needs: deploy-tgs
19992011
steps:
20002012
- name: Setup dotnet
@@ -2012,7 +2024,7 @@ jobs:
20122024
name: release_notes_bins
20132025
path: release_notes_bins
20142026

2015-
- name: Build Changelog (Incremental)
2027+
- name: Compile Changelog (Incremental)
20162028
run: |
20172029
mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null
20182030
dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll --generate-full-notes
@@ -2042,16 +2054,19 @@ jobs:
20422054
deploy-docker:
20432055
name: Deploy TGS (Docker)
20442056
needs: deploy-tgs
2057+
if: (!(cancelled() || failure())) && needs.deploy-tgs.result == 'success'
20452058
runs-on: ubuntu-latest
20462059
steps:
2060+
- name: Install Native Packages # Name checked in rerunFlakyTests.js
2061+
run: |
2062+
sudo apt-get update
2063+
sudo apt-get install -y xmlstarlet
2064+
20472065
- name: Checkout
20482066
uses: actions/checkout@v4
20492067

20502068
- name: Parse TGS version
2051-
run: |
2052-
sudo apt-get update
2053-
sudo apt-get install -y xmlstarlet
2054-
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
2069+
run: echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
20552070

20562071
- name: Docker Build and Push
20572072
uses: elgohr/Publish-Docker-Github-Action@43dc228e327224b2eda11c8883232afd5b34943b # v5
@@ -2065,16 +2080,19 @@ jobs:
20652080
deploy-ppa:
20662081
name: Deploy TGS (PPA)
20672082
needs: deploy-tgs
2083+
if: (!(cancelled() || failure())) && needs.deploy-tgs.result == 'success'
20682084
runs-on: ubuntu-latest
20692085
steps:
2086+
- name: Install Native Packages # Name checked in rerunFlakyTests.js
2087+
run: |
2088+
sudo apt-get update
2089+
sudo apt-get install -y xmlstarlet
2090+
20702091
- name: Checkout
20712092
uses: actions/checkout@v4
20722093

20732094
- name: Parse TGS version
2074-
run: |
2075-
sudo apt-get update
2076-
sudo apt-get install -y xmlstarlet
2077-
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
2095+
run: echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
20782096

20792097
- name: Trigger tgstation-ppa workflow
20802098
run: |
@@ -2083,6 +2101,7 @@ jobs:
20832101
deploy-winget:
20842102
name: Deploy TGS (winget)
20852103
needs: deploy-tgs
2104+
if: (!(cancelled() || failure())) && needs.deploy-tgs.result == 'success'
20862105
runs-on: windows-latest
20872106
steps:
20882107
- name: Setup dotnet

.github/workflows/ci-security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared') && github.event.pull_request.user.id != 49699333
2828
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308
2929
with:
30-
message: Thank you for contributing to ${{ github.event.pull_request.base.repo.name }}! The workflow '${{ github.workflow }}' requires repository secrets and will not run without approval. Maintainers can add the `CI Cleared` label to allow it to run. Note that any changes to ci-security.yml will not be reflected in the run and the ci-pipeline.yml at the HEAD of the pull request will be used.
30+
message: Thank you for contributing to ${{ github.event.pull_request.base.repo.name }}! The workflow '${{ github.workflow }}' requires repository secrets and will not run without approval. Maintainers can add the `CI Cleared` label to allow it to run. Note that any changes to ci-security.yml and ci-pipeline.yml will not be reflected.
3131

3232
- name: Comment on dependabot PR
3333
if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared') && github.event.pull_request.user.id == 49699333
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Automerge Dependabot'
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened, reopened ]
6+
branches:
7+
- dev
8+
- master
9+
10+
concurrency:
11+
group: "dependabot-automerge-${{ github.head_ref || github.run_id }}-${{ github.event_name }}"
12+
cancel-in-progress: true
13+
14+
jobs:
15+
automerge:
16+
name: Enable Automerge on Dependabot PRs
17+
runs-on: ubuntu-latest
18+
if: github.event.pull_request.user.id == 49699333
19+
permissions:
20+
pull-requests: write
21+
steps:
22+
- name: Enable Automerge
23+
uses: daneden/enable-automerge-action@f8558b65c5b8d8bfb592c4e74e3d491624a38fbd #v1.0.2-ish
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)