Merge release/0.1.1 back to 0.1
#23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint and Unit Test | |
| on: | |
| pull_request: | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| CT_CHART_DIRS: "." | |
| CHART_NAME: "ignition" | |
| jobs: | |
| lint-and-unittest: | |
| name: Lint Chart and Run Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # ct needs full history to detect changed charts | |
| - name: Merge with target branch | |
| run: | | |
| git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 | |
| git merge --no-ff FETCH_HEAD | |
| ls -la | |
| - name: Install helm-unittest plugin | |
| run: | | |
| helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3 | |
| helm plugin list | |
| - name: helm-unittest (all changed charts) | |
| run: | | |
| helm unittest "${CHART_NAME}" | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0 | |
| - name: ct lint | |
| run: | | |
| ct lint --all | |
| - name: Package Helm Chart (unsigned) | |
| run: | | |
| mkdir build | |
| helm package --destination build "${CHART_NAME}" | |
| - name: Render simple summary with GH hash to build/SUMMARY.md | |
| run: | | |
| cat << EOF > build/SUMMARY.md | |
| # Build Summary | |
| - Chart: ${CHART_NAME} | |
| - Build Date: $(date -u +"%Y-%m-%dT%H:%M:%SZ") | |
| - Commit: ${GITHUB_SHA} | |
| - Pull Request: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }} | |
| - Workflow Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} | |
| EOF | |
| - name: Artifact Packaged Chart | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: chart-build | |
| path: build/ | |
| retention-days: 30 |