Feat/ci/bump #96
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Helm Charts | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
paths: | |
- charts/** | |
jobs: | |
getChangedChart: | |
uses: ./.github/workflows/get-changed-chart.yaml | |
with: | |
pr_number: ${{ github.event.pull_request.number }} | |
check-licenses: | |
name: check licenses | |
runs-on: ubuntu-latest | |
needs: getChangedChart | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- run: pip install yq | |
- run: ./.github/scripts/scan-for-licenses.sh ${{ needs.getChangedChart.outputs.chart }} | |
check-licenses-list: | |
name: check licenses from list | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- run: pip install yq | |
- run: | | |
IMAGES=($(for chart in charts/*; do if [[ -f "$chart/Chart.yaml" ]]; then cat ./$chart/Chart.yaml | yq -r '.annotations["artifacthub.io/images"] // ""'; fi; done | cut -d ":" -f2 | uniq | sort | sed '/^$/d')) | |
for IMAGE in $IMAGES; do grep -q $IMAGE ./.github/scripts/licenseList || (echo "Image" $IMAGE "not found in accepted list. Please review and add it if acceptable" && return 1); done; |