Skip to content

Commit 1907308

Browse files
updated permissions, excluded common and crds from tests
1 parent e229efa commit 1907308

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/run-lint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
lint-charts:
2424
name: Lint Charts
2525
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
2628
steps:
2729
- name: Code checkout
2830
uses: actions/checkout@v4

.github/workflows/run-testing.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: "Test charts"
33
on:
44
push:
55
paths-ignore:
6-
- 'packages/**'
7-
- 'index.yaml'
6+
- 'charts/victoria-metrics-common/**'
7+
- 'charts/victoria-metrics-operator-crds/**'
88
- '**.md'
99
branches:
1010
- master
1111
pull_request:
1212
paths-ignore:
13-
- 'packages/**'
14-
- 'index.yaml'
13+
- 'charts/victoria-metrics-common/**'
14+
- 'charts/victoria-metrics-operator-crds/**'
1515
- '**.md'
1616
branches:
1717
- master
@@ -23,6 +23,8 @@ jobs:
2323
get-changed-charts:
2424
name: Get changed charts
2525
runs-on: ubuntu-24.04
26+
permissions:
27+
contents: read
2628
outputs:
2729
charts: ${{ steps.charts-diff.outputs.charts }}
2830
steps:
@@ -43,15 +45,17 @@ jobs:
4345
# this bash pipeline extracts unique chart names from the list
4446
- name: Build charts diff
4547
id: charts-diff
46-
run: |
47-
charts=$(echo "${{ steps.changed-charts.outputs.all_modified_files }}" | sed 's/ /\n/g' | grep -vE 'common|crds' | awk -F/ '{print $2}' | sort | uniq | jq -ncR '[inputs]')
48+
run: jq |
49+
charts=$(echo "${{ steps.changed-charts.outputs.all_modified_files }}" | sed 's/ /\n/g' | awk -F/ '{print $2}' | sort | uniq | jq -ncR '[inputs]')
4850
echo "charts=$charts" >> $GITHUB_OUTPUT
4951

5052
install-chart:
5153
name: Install chart
5254
runs-on: ubuntu-24.04
5355
needs: get-changed-charts
5456
if: ${{ needs.get-changed-charts.outputs.charts != '[""]' }}
57+
permissions:
58+
contents: read
5559
strategy:
5660
matrix:
5761
chart: ${{ fromJSON(needs.get-changed-charts.outputs.charts) }}

0 commit comments

Comments
 (0)