Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test changed files #8

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
38 changes: 37 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
outputs:
helm_any_changed: ${{ steps.changed-files-yaml.outputs.helm_any_changed }}
helm_all_changed_files: ${{ steps.changed-files-yaml.outputs.helm_all_changed_files }}
build_any_changed: ${{ steps.changed-files-yaml.outputs.build_any_changed }}
build_all_changed_files: ${{ steps.changed-files-yaml.outputs.build_all_changed_files }}
steps:
- uses: actions/checkout@v4
- name: Get all test, doc and src files that have changed
Expand Down Expand Up @@ -49,4 +54,35 @@ jobs:
DOC_ALL_CHANGED_FILES: ${{ steps.changed-files-yaml.outputs.build_all_changed_files }}
run: |
echo "One or more build file(s) has changed."
echo "List all the files that have changed: $DOC_ALL_CHANGED_FILES"
echo "List all the files that have changed: $DOC_ALL_CHANGED_FILES"


perform-echo:
needs:
- changed_files
runs-on: ubuntu-latest
steps:
- name: Echo
run: |
echo "Helm files changed"
echo "all variables are:"
echo "helm_any_changed: ${{ needs.changed_files.outputs.helm_any_changed }}"
echo ${{ needs.changed_files.outputs.helm_any_changed }}
echo "helm_all_changed_files: ${{ needs.changed_files.outputs.helm_all_changed_files }}"
echo "build_any_changed: ${{ needs.changed_files.outputs.build_any_changed }}"
echo ${{ needs.changed_files.outputs.build_any_changed }}
echo "build_all_changed_files: ${{ needs.changed_files.outputs.build_all_changed_files }}"

echo ${{ needs.changed_files.outputs.helm_any_changed == 'true' }}
echo ${{ needs.changed_files.outputs.helm_any_changed == 'false' }}

conditional-for-helm-change:
needs:
- changed_files
runs-on: ubuntu-latest
if: ${{ needs.changed_files.outputs.helm_any_changed == 'true' }}
steps:
- name: conditional-Echo
run: |
echo "Helm files Updated"
cat $GITHUB_OUTPUT
Loading