fix(deps): update major dependencies #444
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
| # deny.tomlの`graph.targets`がbuild and deploy workflowのものと一致しているかを検査する。 | |
| name: Check release target tuples | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - .github/workflows/check-release-target-tuples.yml | |
| - .github/workflows/build_and_deploy.yml | |
| - deny.toml | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Check release target tuples | |
| run: | | |
| jq_r_from_yaml() { | |
| set -e | |
| json=$(ruby -r json -r yaml -e 'print YAML.load_file($*[0]).to_json' "$2") | |
| jq -r "$1" <(cat <<< "$json") | |
| } | |
| jq_r_from_toml() { | |
| set -e | |
| json=$( | |
| python3 \ | |
| -c 'import json, sys, tomllib | |
| from pathlib import Path | |
| print(json.dumps(tomllib.loads(Path(sys.argv[1]).read_text())))' \ | |
| "$2" | |
| ) | |
| jq -r "$1" <(cat <<< "$json") | |
| } | |
| targets=$(jq_r_from_yaml '.jobs.config.steps[] | select(.id == "strategy_matrix").run' ./.github/workflows/build_and_deploy.yml) | |
| targets=$(sed -n 's/^ \+"target": \(".*"\),$/\1/p' <<< "$targets") | |
| targets=$(jq -sr sort[] <<< "$targets") | |
| [ -n "$targets" ] | |
| diff -u <(cat <<< "$targets") <(jq_r_from_toml '.graph.targets | map(.triple) | sort[]' ./deny.toml) |