Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package version #1564

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
.vscode
.github
node_modules
npm-debug.log
.dockerignore
.env
.git
.github
.gitignore
.node-version
.prettierrc
.replit
config.json
.vscode
CODE_OF_CONDUCT.md
config.json
CONTRIBUTING.md
Procfile
Dockerfile
.dockerignore
docs
node_modules
npm-debug.log
Procfile
5 changes: 5 additions & 0 deletions .github/configs/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Reference: https://github.com/helm/chart-releaser

# Enable automatic generation of release notes using GitHubs release notes generator.
# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
generate-release-notes: true
13 changes: 13 additions & 0 deletions .github/configs/ct-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore
# Only Used for the CT Install Stage
remote: origin
target-branch: main
chart-dirs:
- charts
helm-extra-args: "--timeout 600s"
validate-chart-schema: false
validate-maintainers: true
validate-yaml: true
exclude-deprecated: true
excluded-charts: []
13 changes: 13 additions & 0 deletions .github/configs/ct-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore
# Only Used for the CT Lint Stage
remote: origin
target-branch: main
chart-dirs:
- charts
helm-extra-args: "--timeout 600s"
validate-chart-schema: false
validate-maintainers: true
validate-yaml: true
exclude-deprecated: true
excluded-charts: []
42 changes: 42 additions & 0 deletions .github/configs/lintconf.yaml
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
Original file line number Diff line number Diff line change
@@ -1,60 +1,65 @@
name: Docker Hub

on:
release:
types: [published]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2
# QEMU for emulation
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# Docker Buildx for creating multi arch docker images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# Login against a Docker registry when not a PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
name: Docker Build/Publish
on:
push:
tags: ["*.*.*"] # Publish semver tags as Docker releases.
paths:
- "**/*.ts"
- "**/*.js"
- "**/*.json"
- ".dockerignore"
- "Dockerfile"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

permissions:
contents: read

jobs:
build:
permissions:
packages: write # to push image to GitHub registry
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
# QEMU for emulation
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Docker Buildx for creating multi arch docker images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 #,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
55 changes: 55 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docker Build
on:
push:
tags: ["!*.*.*"]
paths:
- "**/*.ts"
- "**/*.js"
- "**/*.json"
- ".dockerignore"
- "Dockerfile"
pull_request:
branches:
- main
- master

env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
# QEMU for emulation
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Docker Buildx for creating multi arch docker images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 #,linux/arm64,linux/arm/v7
tags: build
labels: ${{ steps.meta.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
72 changes: 72 additions & 0 deletions .github/workflows/helm-lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
## Reference: https://github.com/helm/chart-testing-action
name: Helm Lint and Test
on:
push:
paths:
- "charts/**"
pull_request:
branches:
- main
- master

permissions:
contents: read

jobs:
linter-artifacthub:
runs-on: ubuntu-latest
container:
image: public.ecr.aws/artifacthub/ah:v1.14.0
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run ah lint
working-directory: ./charts
run: ah lint

chart-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.13.0 # Also update in helm-publish.yaml

- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@v2
with:
# Note: Also update in scripts/lint.sh
version: v3.7.1

# - name: List changed charts
# id: list-changed
# run: |
# ## If executed with debug this won't work anymore.
# changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
# charts=$(echo "$changed" | tr '\n' ' ' | xargs)
# if [[ -n "$changed" ]]; then
# echo "changed=true" >> $GITHUB_OUTPUT
# echo "changed_charts=$charts" >> $GITHUB_OUTPUT
# fi

# - name: Create kind cluster
# uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
# if: steps.list-changed.outputs.changed == 'true'
# with:
# config: .github/configs/kind-config.yaml

# - name: Run chart-testing (install)
# run: ct install --config ./.github/configs/ct-install.yaml
# if: steps.list-changed.outputs.changed == 'true'
Loading
Loading