Update clustertool.tests.yaml

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
Kjeld Schouten
2024-10-19 20:29:37 +02:00
committed by GitHub
parent 428c464de2
commit 22884f0814
+31 -11
View File
@@ -15,22 +15,42 @@ on:
# - 'cmd/**' # - 'cmd/**'
# - 'clustertool/**' # - 'clustertool/**'
# - ".github/workflows/clsutertool.test.yaml" # - ".github/workflows/clsutertool.test.yaml"
pull_request: #pull_request:
branches: # branches:
- main # - main
paths: # paths:
- 'main.go' # - 'main.go'
- 'go.mod' # - 'go.mod'
- 'go.sum' # - 'go.sum'
- 'pkg/**' # - 'pkg/**'
- 'cmd/**' # - 'cmd/**'
- 'clustertool/**' # - 'clustertool/**'
- ".github/workflows/clsutertool.test.yaml" # - ".github/workflows/clsutertool.test.yaml"
permissions: permissions:
contents: read contents: read
jobs: jobs:
check_changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check for changes in specific folder
id: check_changes
run: |
if git diff --exit-code HEAD^ HEAD -- clustertool; then
echo "No changes detected in the folder."
echo "::set-output name=changes_detected::false"
else
echo "Changes detected in the folder."
echo "::set-output name=changes_detected::true"
fi
build: build:
runs-on: actions-runners runs-on: actions-runners
if: needs.check_changes.outputs.changes_detected == 'true'
steps: steps:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5 - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with: with: