Merge pull request #4588 from 9swampy/SanitizeParticipant #3759
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'fix/*' | |
- 'feature/*' | |
- 'poc/*' | |
- 'support/*' | |
paths: | |
- '**' | |
- '!docs/**' | |
pull_request: | |
branches: | |
- main | |
- 'support/*' | |
paths: | |
- '**' | |
- '!docs/**' | |
merge_group: | |
types: [checks_requested] | |
repository_dispatch: | |
types: [ ci-release ] | |
env: | |
DOTNET_ROLL_FORWARD: "Major" | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: 1 | |
ENABLED_DIAGNOSTICS: ${{ secrets.ENABLED_DIAGNOSTICS }} | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
attestations: write | |
jobs: | |
prepare: | |
name: Prepare | |
uses: ./.github/workflows/_prepare.yml | |
build: | |
name: Build & Package | |
needs: [ prepare ] | |
uses: ./.github/workflows/_build.yml | |
unit_test: | |
name: Test | |
needs: [ prepare ] | |
uses: ./.github/workflows/_unit_tests.yml | |
with: | |
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} | |
secrets: inherit | |
artifacts_windows_test: | |
name: Artifacts Windows | |
needs: [ build ] | |
uses: ./.github/workflows/_artifacts_windows.yml | |
artifacts_linux_test: | |
needs: [ prepare, build ] | |
name: Artifacts Linux (${{ matrix.arch }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: amd64 | |
runner: ubuntu-24.04 | |
- arch: arm64 | |
runner: ubuntu-24.04-arm | |
uses: ./.github/workflows/_artifacts_linux.yml | |
with: | |
runner: ${{ matrix.runner }} | |
arch: ${{ matrix.arch }} | |
docker_distros: ${{ needs.prepare.outputs.docker_distros }} | |
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} | |
docker_linux_images: | |
needs: [ prepare, build ] | |
name: Docker Images (${{ matrix.arch }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: amd64 | |
runner: ubuntu-24.04 | |
- arch: arm64 | |
runner: ubuntu-24.04-arm | |
uses: ./.github/workflows/_docker.yml | |
with: | |
runner: ${{ matrix.runner }} | |
arch: ${{ matrix.arch }} | |
docker_distros: ${{ needs.prepare.outputs.docker_distros }} | |
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} | |
secrets: inherit | |
docker_linux_manifests: | |
needs: [ prepare, docker_linux_images ] | |
name: Docker Manifests | |
uses: ./.github/workflows/_docker_manifests.yml | |
with: | |
docker_distros: ${{ needs.prepare.outputs.docker_distros }} | |
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} | |
secrets: inherit | |
publish: | |
name: Publish | |
needs: [ artifacts_windows_test, artifacts_linux_test ] | |
uses: ./.github/workflows/_publish.yml | |
secrets: inherit | |
release: | |
name: Release | |
needs: [ publish, docker_linux_manifests ] | |
runs-on: windows-2025 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Restore State | |
uses: ./.github/actions/cache-restore | |
- | |
name: Restore Artifacts | |
uses: ./.github/actions/artifacts-restore | |
- | |
name: Attetstation | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
uses: ./.github/actions/artifacts-attest | |
- | |
name: DockerHub Publish Readme | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
shell: pwsh | |
run: dotnet run/docker.dll --target=DockerHubReadmePublish | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: '[Release]' | |
shell: pwsh | |
run: dotnet run/release.dll --target=PublishRelease | |
- | |
name: '[Publish Release]' | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
event-type: publish-release | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}' |