Skip to content

Add CI

Add CI #13

Workflow file for this run

name: ci
on:
# Run on all PRs
pull_request:
env:
HELM_VERSION: v3.14.4
jobs:
lint:
runs-on: ubuntu-latest
container: python:3
steps:
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "USERNAME" | DOCKER_USERNAME;
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
-
name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
with:
version: v3.10.0
-
uses: actions/checkout@v4
with:
# Fetch the full history so that we can diff against the target branch
depth: 0
-
name: Lint ${{ matrix.chart.name }}
run: |
ct lint --config ct.yaml \
--target-branch ${{ github.event.repository.default_branch }} \
--helm-repo-extra-args "aserto-lib=-u ${DOCKER_USERNAME} -p ${READ_WRITE_TOKEN}"
# detect-changes:
# runs-on: ubuntu-latest
# outputs:
# charts: ${{ steps.changes.outputs.changes }}
# docker_user: ${{ steps.vault.outputs.DOCKER_USERNAME }}
# docker_token: ${{ steps.vault.outputs.READ_WRITE_TOKEN }}
# steps:
# -
# name: Find changed charts
# id: changes
# uses: dorny/paths-filter@v3
# with:
# filters: |
# aserto:
# - 'aserto/**'
# aserto_lib:
# - 'aserto-lib/**'
# authorizer:
# - 'authorizer/**'
# console:
# - 'console/**'
# directory:
# - 'directory/**'
# discovery:
# - 'discovery/**'
# scim:
# - 'scim/**'
# test-changes:
# runs-on: ubuntu-latest
# container: python:3
# needs: detect-changes
# strategy:
# matrix:
# chart: ${{ fromJSON(needs.detect-changes.outputs.charts) }}