Merge pull request #23 from iddqd-uk/renovate/external-secrets-0.x #139
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: 🧪 Tests | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [master, main] | |
paths-ignore: ['**.md'] | |
tags-ignore: ['**'] | |
pull_request: | |
paths-ignore: ['**.md'] | |
concurrency: | |
group: ${{ github.ref }}-tests | |
cancel-in-progress: true | |
jobs: | |
git-leaks: | |
name: Check for GitLeaks | |
runs-on: ubuntu-latest | |
steps: | |
- {uses: actions/checkout@v4, with: {fetch-depth: 0}} | |
- uses: gacts/gitleaks@v1 | |
filter: | |
name: Filter files | |
runs-on: ubuntu-latest | |
outputs: | |
charts: ${{ steps.filter.outputs.charts }} | |
docker: ${{ steps.filter.outputs.docker }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
charts: ['helm/**', '*kube*'] | |
docker: [Dockerfile, '*docker*'] | |
lint-charts: | |
name: Lint the chart | |
runs-on: ubuntu-latest | |
needs: [filter] | |
if: needs.filter.outputs.charts == 'true' | |
strategy: {fail-fast: false, matrix: {chart: [monitoring, system, apps]}} | |
defaults: {run: {working-directory: "./helm/${{ matrix.chart }}"}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dopplerhq/cli-action@v3 | |
- uses: azure/setup-helm@v4 | |
- run: helm dependency update . | |
- run: doppler --no-check-version secrets substitute ./values.doppler.yaml > ./values.yaml | |
env: {DOPPLER_TOKEN: "${{ secrets.DOPPLER_SERVICE_TOKEN }}"} | |
- run: helm template . > /dev/null | |
- run: helm lint --strict . | |
- uses: stackrox/kube-linter-action@v1 | |
with: {directory: .} | |
- {name: Cleanup, if: always(), run: rm -f ./values.yaml} | |
build-docker-image: | |
name: Build the docker image that is used for local cluster management | |
runs-on: ubuntu-latest | |
needs: [filter] | |
if: needs.filter.outputs.docker == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: false | |
tags: env:local |