diff --git a/.github/workflows/helm-pr.yaml b/.github/workflows/helm-pr.yaml new file mode 100644 index 0000000..3fe29b2 --- /dev/null +++ b/.github/workflows/helm-pr.yaml @@ -0,0 +1,26 @@ +name: Helm PR Workflow + +on: + pull_request: + workflow_dispatch: + +jobs: + lint-test: + runs-on: ubuntu-latest + name: Helm Chart Lint + env: + CT_CHART_DIRS: charts + CT_TARGET_BRANCH: $GITHUB_BASE_REF + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v1 + + - name: Fake validator + run: | + ls -la + echo "Faking validator" diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml new file mode 100644 index 0000000..21fc8c3 --- /dev/null +++ b/.github/workflows/helm-release.yaml @@ -0,0 +1,36 @@ +name: Helm Release Workflow + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + helm-release: + runs-on: ubuntu-latest + name: Release Helm Chart + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v1 + + # - name: Add Helm Repo dependencies + # run: helm repo add bitnami https://charts.bitnami.com/bitnami + + - name: Run User chart-releaser + uses: helm/chart-releaser-action@v1.2.1 + env: + CR_TOKEN: "${{ secrets.REPO_TOKEN }}" + CR_SKIP_EXISTING: true + with: + charts_dir: charts diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml deleted file mode 100644 index 10b6f65..0000000 --- a/.github/workflows/lint-test.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Lint and Test Charts - -on: pull_request - -jobs: - lint-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install Helm - uses: azure/setup-helm@v1 - - - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Install chart-testing - uses: helm/chart-testing-action@v2.0.1 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: ct lint - - - name: Create kind cluster - uses: helm/kind-action@v1.0.0 - if: steps.list-changed.outputs.changed == 'true' - - - name: Run chart-testing (install) - run: ct install diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index b402381..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release Charts - -on: - push: - branches: - - main - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v1 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.2.0 - env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"