Skip to content

Commit

Permalink
Merge pull request #92 from unguiculus/feature/ci
Browse files Browse the repository at this point in the history
Update tools versions in GitHub workflow
  • Loading branch information
torstenwalter authored Nov 20, 2020
2 parents 1517320 + 01b4458 commit 331fe3d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 8 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,27 @@ 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: |
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 331fe3d

Please sign in to comment.