Skip to content

Commit

Permalink
only trigger kind validation if kind files are chamged
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdotcosta committed Apr 22, 2024
1 parent f90f278 commit aac99d6
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/pr-kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,41 @@ env:
MACOS_TOOLS: kind kubectl helm

jobs:
# check-if-kind-changed:
# name: Check if kind is changed.
# runs-on: ubuntu-latest
# outputs:
# kind_grep_result: ${{ steps.pr_contains_kind.outputs.grep_result }}
# output2: ${{ steps.step2.outputs.test }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Get changed files
# id: changed-files
# uses: tj-actions/changed-files@v44
# - name: List all changed files
# env:
# ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
# run: |
# for file in ${ALL_CHANGED_FILES}; do
# echo "$file was changed"
# done
# - name: Check if the changes contain and file from kind
# id: pr_contains_kind
# env:
# ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
# continue-on-error: true
# run: |
# set +e
# echo ${ALL_CHANGED_FILES} | grep -c '/kind/'
# echo "grep_result=$(echo ${ALL_CHANGED_FILES} | grep -c '/kind/')" >> $GITHUB_OUTPUT
check-if-kind-changed:
name: Check if kind is changed.
runs-on: ubuntu-latest
outputs:
kind_grep_result: ${{ steps.pr_contains_kind.outputs.grep_result }}
output2: ${{ steps.step2.outputs.test }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Check if the changes contain and file from kind
id: pr_contains_kind
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
continue-on-error: true
run: |
set +e
echo ${ALL_CHANGED_FILES} | grep -c '/kind/'
echo "grep_result=$(echo ${ALL_CHANGED_FILES} | grep -c '/kind/')" >> $GITHUB_OUTPUT
kind-test-docker-linux:
name: Deploy Docker Linux
runs-on: ${{ matrix.os }}
# if: needs.scheck-if-kind-changed.outputs.kind_grep_result > 0
# needs: check-if-kind-changed
if: needs.scheck-if-kind-changed.outputs.kind_grep_result > 0
needs: check-if-kind-changed
env:
IngressHTTPPort: 80
strategy:
Expand Down

0 comments on commit aac99d6

Please sign in to comment.