Use github.ref_name instead of hardcoded branch name #1133
Workflow file for this run
This file contains 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"] | |
pull_request: | |
branches: ["main"] | |
# See https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: ./.github/actions/build | |
- name: Publish | |
uses: ./.github/actions/publish | |
- name: Run Tests | |
uses: ./.github/actions/test | |
- name: Install Templates | |
run: dotnet new install src/IceRpc.Templates/bin/Debug/IceRpc.Templates.*.nupkg | |
shell: bash | |
- name: Test Templates | |
uses: ./.github/actions/test-templates | |
- name: Build Examples | |
uses: ./.github/actions/build-examples | |
- name: Build DocFX Examples | |
run: dotnet build docfx/examples/Examples.sln | |
shell: bash |