Skip to content

feat: copy charts from clients repo #16

feat: copy charts from clients repo

feat: copy charts from clients repo #16

Workflow file for this run

name: Main
on:
merge_group:
workflow_run:
workflows:
- Pull Request Labeler
types: [completed]
pull_request:
types: [ assigned, opened, synchronize, reopened, labeled, unlabeled ]
push:
branches:
- main
tags:
- 'v*.*.*'
jobs:
pr_name:
if: github.event_name == 'pull_request'
name: Check PR Title
runs-on: formance-runner
permissions:
statuses: write
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests:
name: Tests Charts
timeout-minutes: 2
runs-on: formance-runner
needs: chart_any
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Tests
run: earthly +tests
chart_any:
name: Any Chart
timeout-minutes: 1
runs-on: formance-runner
needs: chart_matrix_labels
strategy:
matrix:
chart: ${{ fromJson(needs.chart_matrix_labels.outputs.charts) }}
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- uses: ./.github/actions/helm/anychart
with:
CHART_NAME: ${{ matrix.chart }}
CHART_DIR: charts
chart_matrix_labels:
if: github.event.pull_request.labels != ''
name: Check for Labels
needs: readme
timeout-minutes: 1
runs-on: formance-runner
outputs:
charts: ${{ steps.set-matrix.outputs.charts }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check for Labels
id: set-matrix
run: |
# Extract labels and filter chart labels
CHART_LABELS=$(echo '${{ toJSON(github.event.pull_request.labels) }}' | jq -r '.[].name | select(startswith("chart-")) | sub("chart-"; "")' | jq -R -s -c 'split("\n") | map(select(. != ""))')
# Set the output to be used in the next job
echo "charts=${CHART_LABELS}""
echo "charts=${CHART_LABELS}" >> $GITHUB_ENV
readme:
name: Readme
timeout-minutes: 1
runs-on: formance-runner
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Base Earthly action
uses: ./.github/actions/earthly/base
- name: Readme
run: earthly +readme
- name: Dirty
uses: ./.github/actions/github/dirty