Skip to content

Commit

Permalink
Update github action after default branch update (open-telemetry#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored Jan 27, 2021
1 parent 609d9ee commit 1245255
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
name: Lint and Test Charts

on: pull_request

on:
pull_request:
branches:
- main
jobs:
lint-test:
runs-on: ubuntu-latest
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.0

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@v1.0.0
- uses: actions/setup-python@v2
with:
command: lint
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 --target-branch main)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch main

- name: Create kind cluster
uses: helm/kind-action@v1.0.0
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'

- name: Run chart-testing (install)
uses: helm/chart-testing-action@v1.0.0
with:
command: install
run: ct install --target-branch main
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Charts
on:
push:
branches:
- master
- main

jobs:
release:
Expand Down

0 comments on commit 1245255

Please sign in to comment.