-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.03 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI/CD
on:
workflow_call:
push:
branches:
- main
pull_request:
workflow_dispatch:
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-inputs:
runs-on: ubuntu-24.04
outputs:
is-default-branch: ${{ steps.set-is-default-branch.outputs.CI_IS_DEFAULT_BRANCH }}
steps:
- name: Set is-default-branch
id: set-is-default-branch
run: |
CI_IS_DEFAULT_BRANCH="${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}"
echo "CI_IS_DEFAULT_BRANCH=${CI_IS_DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
echo "CI_IS_DEFAULT_BRANCH=${CI_IS_DEFAULT_BRANCH}" >> $GITHUB_ENV
echo "CI_IS_DEFAULT_BRANCH=${CI_IS_DEFAULT_BRANCH}"
nix:
name: Nix
needs: check-inputs
uses: ./.github/workflows/nix.yaml
secrets: inherit
csharp:
name: C#
needs: check-inputs
uses: ./.github/workflows/csharp.yaml