name: Helm CI/CD Pipeline on: push: branches: [ main ] tags: [ 'v*.*.*' ] pull_request: branches: [ main ] jobs: helm-lint: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Set up Helm uses: azure/setup-helm@v4 with: version: v3.14.0 - name: Lint Development Profile run: helm lint charts/spacex-orbital-forensics -f charts/spacex-orbital-forensics/values-dev.yaml - name: Lint Production Profile run: helm lint charts/spacex-orbital-forensics -f charts/spacex-orbital-forensics/values-prod.yaml - name: Template Dry-Run run: helm template orbital-forensics-test charts/spacex-orbital-forensics --debug helm-release: needs: helm-lint if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout Code uses: actions/checkout@v4 - name: Set up Helm uses: azure/setup-helm@v4 - name: Package Helm Chart run: helm package charts/spacex-orbital-forensics --app-version ${{ github.ref_name }} - name: Login to GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin - name: Push Chart to OCI Registry run: helm push spacex-orbital-forensics-*.tgz oci://ghcr.io/albert-lane-org/CISA-Vulnerability-Regulatory-Compliance-Tracker