Skip to content

Commit

Permalink
Update for new tool versions (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
unguiculus authored Nov 8, 2020
1 parent d8fce97 commit 3db2ea0
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 21 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,37 @@ jobs:
with:
fetch-depth: 0

- name: Run chart-testing (lint)
id: lint
uses: helm/[email protected]
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.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@master
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/[email protected]
if: steps.lint.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
uses: helm/[email protected]
with:
command: install
config: ct.yaml
run: ct install --config ct.yaml
32 changes: 25 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,37 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
# See https://github.com/helm/chart-releaser-action/issues/6
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

# Optional step if GPG signing is used
- name: Prepare GPG key
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
gpg_dir=.cr-gpg
mkdir "$gpg_dir"
keyring="$gpg_dir/secring.gpg"
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
passphrase_file="$gpg_dir/passphrase"
echo "$GPG_PASSPHRASE" > "$passphrase_file"
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
env:
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}"
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"

- name: Add dependency chart repos
run: |
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/[email protected]
uses: helm/chart-releaser-action@master
with:
charts_dir: charts
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion charts/dependencies-v1/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ maintainers:
name: dependencies-v1
sources:
- https://github.com/helm/charts-repo-actions-demo
version: 0.1.6
version: 0.1.7
2 changes: 1 addition & 1 deletion charts/dependencies-v2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainers:
name: dependencies-v2
sources:
- https://github.com/helm/charts-repo-actions-demo
version: 0.1.6
version: 0.1.7
dependencies:
- name: redis
version: 10.7.17
Expand Down
2 changes: 1 addition & 1 deletion charts/example-v1/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ maintainers:
name: example-v1
sources:
- https://github.com/helm/helm
version: 0.1.9
version: 0.1.10
2 changes: 1 addition & 1 deletion charts/example-v2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ maintainers:
name: example-v2
sources:
- https://github.com/helm/helm
version: 0.2.5
version: 0.2.6
4 changes: 4 additions & 0 deletions cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Set to true for GPG signing
sign: true
# UID of the GPG key to use
key: Chart Releaser Test Key

0 comments on commit 3db2ea0

Please sign in to comment.