-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(project): initialize fork (#1)
- Loading branch information
1 parent
3cdf4fe
commit 05b6c36
Showing
56 changed files
with
1,467 additions
and
501 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md | ||
## | ||
remote: origin | ||
target-branch: master | ||
chart-dirs: | ||
- helm/ | ||
chart-repos: | ||
- buttahtoast=https://buttahtoast.github.io/helm-charts/ | ||
- bitnami=https://charts.bitnami.com/bitnami | ||
validate-chart-schema: true | ||
validate-maintainers: false | ||
validate-yaml: true | ||
exclude-deprecated: true | ||
check-version-increment: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
rules: | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: | ||
require-starting-space: true | ||
min-spaces-from-content: 1 | ||
document-end: disable | ||
document-start: disable # No --- to start a file | ||
empty-lines: | ||
max: 2 | ||
max-start: 0 | ||
max-end: 0 | ||
hyphens: | ||
max-spaces-after: 1 | ||
indentation: | ||
spaces: consistent | ||
indent-sequences: whatever # - list indentation will handle both indentation and without | ||
check-multi-line-strings: false | ||
key-duplicates: enable | ||
line-length: disable # Lines can be any length | ||
new-line-at-end-of-file: enable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check actions | ||
permissions: {} | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master", "main" ] | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- name: Ensure SHA pinned actions | ||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@f32435541e24cd6a4700a7f52bb2ec59e80603b1 # v2.1.4 | ||
with: | ||
# slsa-github-generator requires using a semver tag for reusable workflows. | ||
# See: https://github.com/slsa-framework/slsa-github-generator#referencing-slsa-builders-and-generators | ||
allowlist: | | ||
slsa-framework/slsa-github-generator |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check Commit | ||
permissions: {} | ||
|
||
on: | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
commit_lint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@6319f54d83768b60acd6fd60e61007ccc583e62f #v5.4.3 | ||
with: | ||
firstParent: true |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build images | ||
permissions: {} | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master", "main" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-images: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- name: ko build | ||
run: VERSION=${{ github.ref_name }} REPOSITORY=${GITHUB_REPOSITORY} make docker-build | ||
- name: Trivy Scan Image | ||
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0 | ||
with: | ||
scan-type: 'fs' | ||
ignore-unfixed: true | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Publish images | ||
permissions: {} | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
publish-images: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
id-token: write | ||
outputs: | ||
container-digest: ${{ steps.publish.outputs.digest }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- name: "Extract Version" | ||
id: extract_version | ||
run: | | ||
GIT_TAG=${GITHUB_REF##*/} | ||
VERSION=${GIT_TAG##v} | ||
echo "version=$(echo $VERSION)" >> $GITHUB_OUTPUT | ||
- name: Run Trivy vulnerability (Repo) | ||
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0 | ||
with: | ||
scan-type: 'fs' | ||
ignore-unfixed: true | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2 | ||
- name: Publish with KO | ||
id: publish | ||
uses: peak-scale/github-actions/make-ko-publish@38322faabccd75abfa581c435e367d446b6d2c3b # v0.1.0 | ||
with: | ||
makefile-target: docker-publish | ||
registry: ghcr.io | ||
registry-username: ${{ github.actor }} | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository_owner }} | ||
version: ${{ steps.extract_version.outputs.version }} | ||
sign-image: true | ||
sbom-name: cloudflare-tunnel-ingress-controller | ||
sbom-repository: ghcr.io/${{ github.repository_owner }}/sbom | ||
signature-repository: ghcr.io/${{ github.repository_owner }}/signatures | ||
main-path: ./cmd/cloudflare-tunnel-ingress-controller/ | ||
env: | ||
REPOSITORY: ${{ github.repository }} | ||
VERSION: ${{ steps.extract_version.outputs.version }} | ||
generate-provenance: | ||
needs: publish-images | ||
permissions: | ||
id-token: write # To sign the provenance. | ||
packages: write # To upload assets to release. | ||
actions: read # To read the workflow path. | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
image: ghcr.io/${{ github.repository_owner }}/cloudflare-tunnel-ingress-controller | ||
digest: "${{ needs.publish-images.outputs.container-digest }}" | ||
registry-username: ${{ github.actor }} | ||
secrets: | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish charts | ||
permissions: read-all | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
jobs: | ||
publish-helm: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
outputs: | ||
chart-digest: ${{ steps.helm_publish.outputs.digest }} | ||
steps: | ||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2 | ||
- name: "Extract Version" | ||
id: extract_version | ||
run: | | ||
GIT_TAG=${GITHUB_REF##*/} | ||
VERSION=${GIT_TAG##v} | ||
echo "version=$(echo $VERSION)" >> $GITHUB_OUTPUT | ||
- name: Helm | Publish | ||
id: helm_publish | ||
uses: peak-scale/github-actions/helm-oci-chart@38322faabccd75abfa581c435e367d446b6d2c3b | ||
with: | ||
registry: ghcr.io | ||
repository: ${{ github.repository_owner }}/charts | ||
name: "cloudflare-tunnel-ingress-controller" | ||
path: "./charts/cloudflare-tunnel-ingress-controller/" | ||
app-version: ${{ steps.extract_version.outputs.version }} | ||
version: ${{ steps.extract_version.outputs.version }} | ||
registry-username: ${{ github.actor }} | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
update-dependencies: 'true' # Defaults to false | ||
sign-image: 'true' | ||
signature-repository: ghcr.io/${{ github.repository_owner }}/signatures | ||
helm-provenance: | ||
needs: publish-helm | ||
permissions: | ||
id-token: write # To sign the provenance. | ||
packages: write # To upload assets to release. | ||
actions: read # To read the workflow path. | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
image: ghcr.io/${{ github.repository_owner }}/charts/cloudflare-tunnel-ingress-controller | ||
digest: "${{ needs.publish-helm.outputs.chart-digest }}" | ||
registry-username: ${{ github.actor }} | ||
secrets: | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test charts | ||
permissions: {} | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master", "main" ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
- uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 | ||
- name: Setup Chart Linting | ||
id: lint | ||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config .github/configs/ct.yaml) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --debug --config .github/configs/ct.yaml --lint-conf .github/configs/lintconf.yaml | ||
- name: Run docs-testing (helm-docs) | ||
id: helm-docs | ||
run: | | ||
make helm-docs | ||
if [[ $(git diff --stat) != '' ]]; then | ||
echo -e '\033[0;31mDocumentation outdated! (Run make helm-docs locally and commit)\033[0m ❌' | ||
git diff --color | ||
exit 1 | ||
else | ||
echo -e '\033[0;32mDocumentation up to date\033[0m ✔' | ||
fi | ||
## Create KIND Cluster | ||
- name: Create kind cluster | ||
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
# Install Charts | ||
- name: Run chart-testing (install) | ||
run: ct install --debug --config .github/configs/ct.yaml | ||
if: steps.list-changed.outputs.changed == 'true' |
Oops, something went wrong.