-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 975 Bytes
/
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
40
41
name: CI/CD
on:
workflow_call:
push:
branches:
- main
pull_request:
workflow_dispatch:
on:
pull_request:
workflow_dispatch:
env:
CI_IS_DEFAULT_BRANCH: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
CI_IS_TAG: ${{ startsWith(github.ref, 'refs/tags/') }}
jobs:
check-inputs:
runs-on: ubuntu-24.04
outputs:
CI_CARGO_PROFILE: ${{ steps.set-profile.outputs.CI_CARGO_PROFILE }}
steps:
- name: Set CI_CARGO_PROFILE
id: set-profile
run: |
if [[ ${CI_IS_DEFAULT_BRANCH} == 'true' ]]; then
echo "CI_CARGO_PROFILE=artifact" >> $GITHUB_OUTPUT
else
echo "CI_CARGO_PROFILE=debug" >> $GITHUB_OUTPUT
fi
rust:
needs: check-inputs
uses: ./.github/workflows/rust.yaml
with:
profile: ${{ needs.check-inputs.outputs.CI_CARGO_PROFILE }}
container:
needs: rust
uses: ./.github/workflows/container.yaml