fix(deps): update google.golang.org/genproto/googleapis/api digest to b703f56 #1115
This file contains hidden or 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
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| schedule: | |
| - cron: "0 21 * * *" | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| calculate-policy-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| policy_working_dirs: ${{ steps.calculate-policy-dirs.outputs.policy_working_dirs }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 # checkout all history to do git diff | |
| - name: calculate which policies need a CI job | |
| id: calculate-policy-dirs | |
| shell: bash | |
| run: | | |
| set - | |
| git remote -v | |
| policies_working_dirs=($(find policies -maxdepth 2 -name Makefile -exec dirname '{}' \;)) | |
| if [ "${{github.event_name}}" == "pull_request" ]; then | |
| # list only changes of files in `policies/`: | |
| # it's necessary to add the `|| true` in the pipe because if the CI is running in a PR with no changes under | |
| # the policies directory, the script will fail in the grep command. | |
| git_files="$(git diff --no-color --find-renames --find-copies --name-only origin/${{ github.base_ref }}...${{ github.sha }} -- policies | grep -v '^policies/crates/' || true)" | |
| # build policy_working_dirs: | |
| policies_working_dirs=($(echo "$git_files" | cut -d/ -f1,2 )) | |
| fi | |
| declare -p policies_working_dirs # for debug | |
| policy_working_dirs=$(jq --compact-output --null-input '$ARGS.positional | map(select(. != "policies/Makefile.rust" and . != "policies/Makefile.wasigo" and . != "policies/Makefile.tinygo" and . != "policies/Makefile.p-rego" and . != "policies/go-common.mk" and . != "policies/Cargo.lock" and . != "policies/Cargo.toml" and . != "policies/go.mod" and . != "policies/go.sum")) | unique' --args -- "${policies_working_dirs[@]}") | |
| echo "policy_working_dirs=$policy_working_dirs" | |
| echo "policy_working_dirs=$policy_working_dirs" >> $GITHUB_OUTPUT | |
| policy-CI: | |
| name: Policy | |
| uses: ./.github/workflows/reusable-ci.yaml | |
| needs: calculate-policy-matrix | |
| if: ${{ needs.calculate-policy-matrix.outputs.policy_working_dirs != '[]' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| policy-working-dir: ${{ fromJSON(needs.calculate-policy-matrix.outputs.policy_working_dirs) }} | |
| with: | |
| policy-working-dir: ${{ matrix.policy-working-dir }} |