Skip to content

Commit

Permalink
Update tools versions in GitHub workflow
Browse files Browse the repository at this point in the history
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 <unguiculus@gmail.com>
  • Loading branch information
unguiculus committed Nov 20, 2020
1 parent 1517320 commit e6491b6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 23 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,40 @@ 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:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
with:
command: lint
config: ct.yaml
version: v3.3.0

- 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
19 changes: 9 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,35 @@ name: Release Charts
on:
push:
branches:
- main
- master

jobs:
release:
runs-on: ubuntu-latest
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: |
helm repo add stable https://charts.helm.sh/stable
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 }}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/charts/*/charts
.idea
.vscode
.project
.settings

0 comments on commit e6491b6

Please sign in to comment.