Skip to content
Merged
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
38 changes: 33 additions & 5 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Unitify CI Pipeline

on:
pull_request:
branches: [main]
Expand All @@ -17,16 +18,40 @@ permissions:
contents: read

jobs:
init:
name: initialize
runs-on: ubuntu-24.04
outputs:
run-privileged-jobs: ${{ steps.vars.outputs.run-privileged-jobs }}
strong-name-key-filename: ${{ steps.vars.outputs.strong-name-key-filename }}
build-switches: ${{ steps.vars.outputs.build-switches }}
Comment on lines +24 to +27
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job outputs use names with hyphens (e.g., is-fork-pr, run-privileged-jobs). In GitHub Actions expressions, dot-notation property access does not support hyphens, so steps.vars.outputs.is-fork-pr / steps.vars.outputs.run-privileged-jobs will not evaluate correctly. Rename these outputs to use underscores (e.g., is_fork_pr) or access them via bracket notation (e.g., steps.vars.outputs['is-fork-pr']) consistently.

Copilot uses AI. Check for mistakes.
steps:
- id: vars
name: calculate workflow variables
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
echo "run-privileged-jobs=false" >> "$GITHUB_OUTPUT"
echo "strong-name-key-filename=" >> "$GITHUB_OUTPUT"
echo "build-switches=-p:SkipSignAssembly=true" >> "$GITHUB_OUTPUT"
else
echo "run-privileged-jobs=true" >> "$GITHUB_OUTPUT"
echo "strong-name-key-filename=unitify.snk" >> "$GITHUB_OUTPUT"
echo "build-switches=" >> "$GITHUB_OUTPUT"
fi

build:
name: call-build
needs: [init]
strategy:
matrix:
arch: [X64, ARM64]
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v3
with:
configuration: ${{ matrix.configuration }}
strong-name-key-filename: unitify.snk
strong-name-key-filename: ${{ needs.init.outputs.strong-name-key-filename }}
build-switches: ${{ needs.init.outputs.build-switches }}
Comment on lines +53 to +54
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs.init.outputs.strong-name-key-filename and needs.init.outputs.build-switches use dot-notation to access output names containing hyphens. This will be parsed incorrectly in GitHub Actions expressions. Use bracket notation (e.g., needs.init.outputs['strong-name-key-filename']) or rename the init outputs to not include hyphens and update all references.

Copilot uses AI. Check for mistakes.
runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
upload-build-artifact-name: build-${{ matrix.configuration }}-${{ matrix.arch }}
secrets: inherit
Expand Down Expand Up @@ -78,8 +103,9 @@ jobs:
download-pattern: build-${{ matrix.configuration }}-${{ matrix.arch }}

sonarcloud:
if: ${{ needs.init.outputs.run-privileged-jobs == 'true' }}
name: call-sonarcloud
needs: [build,test_linux,test_windows]
needs: [init, build, test_linux, test_windows]
Comment on lines +106 to +108
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level condition uses needs.init.outputs.run-privileged-jobs, but run-privileged-jobs contains hyphens and cannot be accessed via dot-notation in GitHub Actions expressions. Use bracket notation (e.g., needs.init.outputs['run-privileged-jobs'] == 'true') or rename the output key and update all if: conditions accordingly.

Copilot uses AI. Check for mistakes.
uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v3
with:
organization: geekle
Expand All @@ -88,16 +114,18 @@ jobs:
secrets: inherit

codecov:
if: ${{ needs.init.outputs.run-privileged-jobs == 'true' }}
name: call-codecov
needs: [build,test_linux,test_windows]
needs: [init, build, test_linux, test_windows]
Comment on lines +117 to +119
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level condition uses needs.init.outputs.run-privileged-jobs, but output names containing hyphens cannot be accessed via dot-notation in GitHub Actions expressions. Use bracket notation for this output key or rename it (and update all references).

Copilot uses AI. Check for mistakes.
uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1
with:
repository: codebeltnet/unitify
secrets: inherit

codeql:
if: ${{ needs.init.outputs.run-privileged-jobs == 'true' }}
name: call-codeql
needs: [build,test_linux,test_windows]
needs: [init, build, test_linux, test_windows]
Comment on lines +126 to +128
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level condition uses needs.init.outputs.run-privileged-jobs, but output names containing hyphens cannot be accessed via dot-notation in GitHub Actions expressions. Use bracket notation for this output key or rename it (and update all references).

Copilot uses AI. Check for mistakes.
uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v3
permissions:
security-events: write
Expand Down
Loading