Compare commits
1 Commits
5fc0932658
...
c751b441cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
c751b441cf
|
@@ -7,19 +7,14 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'clusters/*/helm/**'
|
- 'clusters/*/helm/**'
|
||||||
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/*/helm/**'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CLUSTER: cl01tl
|
CLUSTER: cl01tl
|
||||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-helm:
|
lint-pull-request:
|
||||||
runs-on: ubuntu-js
|
runs-on: ubuntu-js
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -33,11 +28,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
branch: ${{ gitea.base_ref }}
|
branch: ${{ gitea.base_ref }}
|
||||||
|
|
||||||
- name: Report Branch Exists
|
- name: Branch Exists
|
||||||
id: branch-exists
|
id: branch-exists
|
||||||
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
echo ">> Branch ${{ gitea.base_ref }} is exists, will continue with linting"
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
|
|
||||||
@@ -58,7 +53,6 @@ jobs:
|
|||||||
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Checking for changes ..."
|
echo ">> Checking for changes ..."
|
||||||
git diff --name-only "${BASE_BRANCH}" -- | xargs -I {} dirname {} | sort -u | grep 'clusters/*/helm/'
|
|
||||||
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" -- | xargs -I {} dirname {} | sort -u | grep 'clusters/*/helm/')
|
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" -- | xargs -I {} dirname {} | sort -u | grep 'clusters/*/helm/')
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
if [ -n "${GIT_DIFF}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user