Skip to content

reset chart.yaml to match dev #85

reset chart.yaml to match dev

reset chart.yaml to match dev #85

name: CI Copied Files Check
on:
push:
branches:
- check_pr_copies
pull_request:
branches:
- main
jobs:
# ------------------------------------------------------------------------------------------------------------------------------------------------
# Event `pull_request`: Compare the last commit of the main branch or last remote commit of the PR branch -> to the current commit of a PR branch.
# ------------------------------------------------------------------------------------------------------------------------------------------------
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
outputs:
check_result: ${{ steps.step1.outputs.result }}
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
ref: check_pr_copies
- name: Get changed files in specific repo folders
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
charts/staging/**
charts/prod/**
# clusters/staging/**
# clusters/prod/**
# secrets/staging/**
# secrets/prod**
- name: Run step if any file(s) in the folder change
id: step1
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "One or more files in the folder has changed."
echo "Files that have changed: $ALL_CHANGED_FILES"
echo "result=true" >> "$GITHUB_OUTPUT"
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
res=$( sudo ./scripts/pr_check_copies.sh "$file" )
echo $res
if [ "$res" -eq 1 ]; then
echo "result=false" >> "$GITHUB_OUTPUT"
break;
fi
done
comment_pr:
needs: changed_files
if: ${{ contains(needs.changed_files.outputs.any_changed, 'true') }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
if: contains(needs.changed_files.outputs.check_result, 'true')
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 All files are an exact match to previous environment(s)'
})