Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: 'recursive'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: download JSON submodule
Expand All @@ -35,7 +35,7 @@ jobs:
run: dotnet test --no-build --verbosity normal

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
retention-days: 5
name: openapi-schemas
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Set up Docker Buildx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: superfly/flyctl-actions/setup-flyctl@master

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Initial static JSON schema submodule
run: git submodule update --init ./src/Helldivers-2-Models/json
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Generate OpenAPI JSON files
Expand All @@ -54,11 +54,11 @@ jobs:
name: 'docs'
path: '.'
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
8 changes: 4 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'

Expand All @@ -39,7 +39,7 @@ jobs:

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: sync-artifacts
path: |
Expand All @@ -58,7 +58,7 @@ jobs:

- name: Comment on PR on failure
if: ${{ steps.run_sync.outcome == 'failure' && github.event_name == 'pull_request' }}
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/update-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Update JSON data submodule

on:
repository_dispatch:
types: [json-data-updated]
workflow_dispatch: {}

permissions:
contents: write
pull-requests: write
issues: write

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
fetch-depth: 0

- name: Update submodule to latest
id: update
run: |
git submodule update --remote --merge src/Helldivers-2-Models/json
if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Setup .NET
if: steps.update.outputs.changed == 'true'
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x' # match whatever your Directory.Build.props/global.json targets

- name: Build and test
if: steps.update.outputs.changed == 'true'
id: build
continue-on-error: true
run: |
dotnet restore Helldivers-2.sln
dotnet build Helldivers-2.sln --no-restore --configuration Release
dotnet test Helldivers-2.sln --no-build --configuration Release

- name: Open PR if build succeeded
if: steps.update.outputs.changed == 'true' && steps.build.outcome == 'success'
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore: update JSON data submodule"
title: "chore: update JSON data submodule"
body: |
Automated update of `src/Helldivers-2-Models/json` to the latest commit on `master`.
Build and tests passed.
branch: auto/update-json-submodule
delete-branch: true

- name: Open issue if build failed
if: steps.update.outputs.changed == 'true' && steps.build.outcome == 'failure'
uses: actions/github-script@v9
with:
script: |
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "Build failure after JSON submodule auto-update",
body: `The automated submodule update to \`src/Helldivers-2-Models/json\` broke the build.\n\nWorkflow run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
labels: ["automated", "build-failure"]
})
Loading