reduce redundancy on repo name #43
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# ct needs history to compare | |
fetch-depth: 0 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
tags: okteto/civo-webhook:ct | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'okteto/civo-webhook:ct' | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
- name: Install Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.8.1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
check-latest: true | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs chart) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
exit 0 | |
- name: Run chart-testing (lint) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | |
- name: Create kind cluster | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: helm/[email protected] | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --target-branch ${{ github.event.repository.default_branch }} | |
- name: Publish dev chart | |
uses: appany/helm-oci-chart-releaser@main | |
with: | |
name: cert-manager-webhook-civo | |
repository: okteto | |
tag: 0.0.0-${{ github.sha }} | |
path: chart/cert-manager-webhook-civo | |
registry: ghcr.io | |
registry_username: ${{ github.actor }} | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
update_dependencies: 'true' |