Update charts-release.yaml
Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
@@ -27,31 +27,22 @@ defaults:
|
|||||||
jobs:
|
jobs:
|
||||||
check_changes:
|
check_changes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
changes_detected: ${{ steps.filter.outputs.changed }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Check for changes in specific folders and README.md files
|
- name: Filter paths
|
||||||
id: check_changes
|
id: filter
|
||||||
run: |
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
||||||
# If this is a pull request, fetch the base branch
|
with:
|
||||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
list-files: json
|
||||||
git fetch origin ${{ github.event.pull_request.base.ref }}
|
filters: |
|
||||||
BASE_COMMIT="origin/${{ github.event.pull_request.base.ref }}"
|
changed:
|
||||||
else
|
- 'website/**'
|
||||||
# For workflow_call, use the default behavior (current commit)
|
- '**/docs/**'
|
||||||
BASE_COMMIT="${{ github.sha }}^" # Compare against the previous commit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Compare changes
|
|
||||||
if git diff --exit-code $BASE_COMMIT...${{ github.sha }} -- website/ **/docs **/README.md; then
|
|
||||||
echo "No changes detected in the specified folders or README.md files."
|
|
||||||
echo "::set-output name=changes_detected::false"
|
|
||||||
else
|
|
||||||
echo "Changes detected in the specified folders or README.md files."
|
|
||||||
echo "::set-output name=changes_detected::true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
release-helm:
|
release-helm:
|
||||||
permissions:
|
permissions:
|
||||||
@@ -59,7 +50,7 @@ jobs:
|
|||||||
name: "${{ github.ref == 'refs/heads/master' && '(Production)' || '(Preview)' }}"
|
name: "${{ github.ref == 'refs/heads/master' && '(Production)' || '(Preview)' }}"
|
||||||
runs-on: actions-runners
|
runs-on: actions-runners
|
||||||
needs: check_changes
|
needs: check_changes
|
||||||
if: needs.check_changes.outputs.changes_detected == 'true'
|
if: needs.check_changes.outputs.changes_detected == 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
|
||||||
|
|||||||
Reference in New Issue
Block a user