Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,42 @@ on:
workflow_dispatch:
jobs:
helm:
uses: parcelLab/ci/.github/workflows/helm.yaml@v9
with:
chartsPath: parcellab
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Helm
uses: azure/setup-helm@v5

- name: Lint and render charts
run: |
set -euo pipefail
charts=()
while IFS= read -r chart; do
parent=$(dirname "$chart")
# A chart in <chart>/charts/ is a vendored dependency. It is validated
# through its parent, which supplies its values.
if [ "$(basename "$parent")" = charts ] && [ -f "$(dirname "$parent")/Chart.yaml" ]; then
continue
fi
charts+=("$chart")
done < <(find parcellab -name Chart.yaml -exec dirname {} \; | sort)
if [ ${#charts[@]} -eq 0 ]; then
echo "::error::No Chart.yaml found under parcellab"
exit 1
fi
for chart in "${charts[@]}"; do
echo "::group::$chart"
helm dependency build "$chart"
helm lint "$chart"
# Library charts render nothing and make `helm template` fail.
if ! helm show chart "$chart" | grep -q "^type: library"; then
helm template "$chart" > /dev/null
fi
echo "::endgroup::"
done

# Required status check in branch protection (INF-4419). Fails if any
# check failed or was cancelled.
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ on:
workflow_dispatch:
jobs:
lint:
uses: parcelLab/ci/.github/workflows/json.yaml@v9
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up node environment
uses: actions/setup-node@v7
with:
node-version: lts/*
- name: Lint JSON
run: npx --yes prettier@3.9.6 --check -- "**/*.json"
32 changes: 28 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,31 @@ on:
- reopened
- synchronize
jobs:
pr:
uses: parcelLab/ci/.github/workflows/pr.yaml@v9
secrets:
repoAccessToken: ${{ secrets.GITHUB_TOKEN }}
label:
runs-on: ubuntu-latest
timeout-minutes: 40
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Label PR based on pushed file paths
continue-on-error: true
uses: actions/labeler@v7.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yaml
sync-labels: true

validate_title:
name: Validate PR title
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: amannn/action-semantic-pull-request@v6.1.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
requireScope: false
validateSingleCommit: false
12 changes: 11 additions & 1 deletion .github/workflows/yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ on:
workflow_dispatch:
jobs:
lint:
uses: parcelLab/ci/.github/workflows/yaml.yaml@v9
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up node environment
uses: actions/setup-node@v7
with:
node-version: lts/*
- name: Lint YAML files
run: npx --yes prettier@3.9.6 --check -- "**/*.{yaml,yml}"