Skip to content

Commit

Permalink
ci(workflows): update GitHub Actions for Helm chart automation (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
TartanLeGrand committed Jun 11, 2024
1 parent 5faf7c1 commit d638a48
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/conventional-commits-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Conventional Commits Check

on:
pull_request:
branches: [ master ]

jobs:
check-conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check Commit Conventions
uses: webiny/action-conventional-commits@v1.3.0
15 changes: 15 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-charts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Lint n8n Chart
uses: WyriHaximus/github-action-helm3@v4
with:
exec: helm lint .
51 changes: 51 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Charts

on:
push:
tags:
- '*'

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true

# see https://github.com/helm/chart-releaser/issues/183
- name: Login to 8gears.container-registry.com
uses: docker/login-action@v3
with:
registry: 8gears.container-registry.com
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Push charts to 8gears.container-registry.com
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://8gears.container-registry.com/library/n8n"
done
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Please

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release Please Action
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
commands.sh
yamls
*.tgz
.idea
.vscode

0 comments on commit d638a48

Please sign in to comment.