simplify CI script to check diffs #132
Workflow file for this run
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
name: CI Copied Files Check | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
check_files: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
files_yaml: | | |
staging: | |
- charts/staging/** | |
prod: | |
- charts/prod/** | |
- name: Check staging files | |
if: steps.changed-files.outputs.staging_any_changed == 'true' | |
run: | | |
echo "Changed files in staging:" | |
for file in ${{ steps.changed-files.outputs.staging_all_changed_files }}; do | |
echo "Checking $file..." | |
if ! ${{ github.workspace }}/.github/workflows/pr_check_copies.sh "$file" "staging" "dev"; then | |
echo "❌ $file differs from dev version" | |
exit 1 | |
fi | |
done | |
echo "✅ All staging files match dev" | |
- name: Check prod files | |
if: steps.changed-files.outputs.prod_any_changed == 'true' | |
run: | | |
echo "Changed files in prod:" | |
for file in ${{ steps.changed-files.outputs.prod_all_changed_files }}; do | |
echo "Checking $file..." | |
if ! ${{ github.workspace }}/.github/workflows/pr_check_copies.sh "$file" "prod" "staging"; then | |
echo "❌ $file differs from staging version" | |
exit 1 | |
fi | |
done | |
echo "✅ All prod files match staging" |