ci: add check for policy samples #7
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
# Copyright (c) Microsoft Corporation. | |
name: Check policy samples | |
on: | |
pull_request: # TODO: types? | |
permissions: read-all | |
jobs: | |
build: | |
name: Check policy samples | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install yq | |
env: | |
INSTALL_IN_GOPATH: false | |
run: | | |
./ci/install_yq.sh | |
- name: Install Rust | |
run: | | |
./tests/install_rust.sh | |
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH | |
- name: Install protobuf-compiler | |
run: | | |
sudo apt-get -y install protobuf-compiler | |
- name: Update policy samples | |
run: | | |
pushd src/tools/genpolicy | |
python3 update_policy_samples.py | |
popd | |
- name: Check policy samples | |
run: | | |
git diff-files --exit-code |