-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: swap new buck audit steps into github actions
- Loading branch information
Showing
2 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Buck2 audit | ||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, synchronize, labeled, unlabeled] | ||
|
||
jobs: | ||
buck2-test: | ||
name: Buck2 Audit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v4 | ||
- name: Run the Magic Nix Cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Prepare Buck2 audit 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:audit" | ||
;; | ||
core) | ||
ARGS+=" //core/api:audit" | ||
;; | ||
esac | ||
done | ||
echo "Prepared args: $ARGS" | ||
echo "args=$ARGS" >> "$GITHUB_OUTPUT" | ||
- name: Buck2 test | ||
run: nix develop -c buck2 test ${{ steps.prepare_args.outputs.args }} |