-
Notifications
You must be signed in to change notification settings - Fork 145
36 lines (35 loc) · 1.02 KB
/
buck2-build.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
name: Buck2 build
on:
pull_request:
branches: [main]
types: [opened, synchronize, labeled, unlabeled]
jobs:
buck2-build:
name: Buck2 Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Buck2 build args from labels
id: prepare_args
run: |
ARGS=""
cat <<EOF > labels.json
${{ toJSON(github.event.pull_request.labels.*.name) }}
EOF
for LABEL in dashboard consent core; do
case "$LABEL" in
dashboard|consent)
ARGS+=" //apps/$LABEL:$LABEL"
;;
core)
ARGS+=" //core/api:api"
;;
esac
done
echo "Prepared args: $ARGS"
echo "args=$ARGS" >> "$GITHUB_OUTPUT"
- name: Buck2 build
run: nix develop -c buck2 build ${{ steps.prepare_args.outputs.args }}