From 01b44583b1dcd3b19d4be79249c0fc5e729ee8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Fri, 20 Nov 2020 16:53:27 +0100 Subject: [PATCH] Update tools versions in GitHub workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates GitHub actions and tools used in GitHub workflows to the latest versions. See https://github.com/helm/charts-repo-actions-demo for reference. This update adds support for GPG signing which will be required for the planned addition of Loki charts. See grafana/loki/issues/2593 Signed-off-by: Reinhard Nägele --- .github/workflows/lint-test.yaml | 41 ++++++++++++++++++++++---------- .github/workflows/release.yaml | 17 +++++++------ .gitignore | 5 ++++ 3 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index c758ac4571..362805d8dc 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -8,23 +8,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: Fetch history - run: git fetch --prune --unshallow + - name: Set up Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.1 - - name: Run chart-testing (lint) - id: lint - uses: helm/chart-testing-action@v1.0.0 + # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and + # yamllint (https://github.com/adrienverge/yamllint) which require Python + - name: Set up Python + uses: actions/setup-python@v2 with: - command: lint - config: ct.yaml + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --config ct.yaml) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --config ct.yaml - name: Create kind cluster - uses: helm/kind-action@v1.0.0 - if: steps.lint.outputs.changed == 'true' + uses: helm/kind-action@v1.1.0 + if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) - uses: helm/chart-testing-action@v1.0.0 - with: - command: install - config: ct.yaml + run: ct install --config ct.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7244f66d73..d3761ee5d7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,21 +11,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - - name: Fetch history - run: git fetch --prune --unshallow + with: + fetch-depth: 0 - name: Configure Git run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - # See https://github.com/helm/chart-releaser-action/issues/6 - name: Install Helm - run: | - curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh + uses: azure/setup-helm@v1 + with: + version: v3.4.1 - name: Add dependency chart repos run: | @@ -33,6 +30,8 @@ jobs: helm repo add incubator https://charts.helm.sh/incubator - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.0.0 + uses: helm/chart-releaser-action@v1.1.0 + with: + charts_dir: charts env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..8533db6e99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/charts/*/charts +.idea +.vscode +.project +.settings