Updated container use semantics order to allow checkout to work

This commit is contained in:
qwsdcvghyu89
2026-06-05 00:13:40 +10:00
parent e11c689602
commit 2e943882ec
+9 -10
View File
@@ -3,8 +3,7 @@ name: Nightly Build and Release
on: on:
push: push:
branches: branches:
- master - main
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -12,19 +11,20 @@ jobs:
name: 'Build and Release Nightly' name: 'Build and Release Nightly'
runs-on: Debian-x86 runs-on: Debian-x86
permissions: permissions:
contents: write # Ensures the GITHUB_TOKEN has permission to create/update releases contents: write
container:
image: mcr.microsoft.com/dotnet/sdk:9.0
steps: steps:
# 1. This runs on the host runner environment (which has Node.js)
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
# 1. Run your custom MSBuild target # 2. This specific step spins up the .NET container dynamically just for the build
- name: 'Execute .NET Publish Target' - name: 'Execute .NET Publish Target'
run: dotnet build aeqw89.tools.Publish/aeqw89.tools.Publish.csproj -t:PublishAll uses: docker://mcr.microsoft.com/dotnet/sdk:9.0
with:
args: dotnet build aeqw89.tools.Publish/aeqw89.tools.Publish.csproj -t:PublishAll
# 2. Upload all generated archives to the 'nightly' release # 3. This runs on the host to seamlessly upload to the Gitea release
- name: Update Nightly Release - name: Update Nightly Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
@@ -35,7 +35,6 @@ jobs:
**Commit:** ${{ github.sha }} **Commit:** ${{ github.sha }}
prerelease: true prerelease: true
# This glob pattern grabs every zip and tar.gz inside your dist folder
files: | files: |
aeqw89.tools.Publish/dist/*.zip aeqw89.tools.Publish/dist/*.zip
aeqw89.tools.Publish/dist/*.tar.gz aeqw89.tools.Publish/dist/*.tar.gz