Skip to content

Commit

Permalink
Merge pull request #1 from unpoller/update_chart_on_unpoller_relrease
Browse files Browse the repository at this point in the history
Create Release CI
  • Loading branch information
jlpedrosa authored May 6, 2024
2 parents 99852ec + 3c1ec5e commit 51d447f
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/on_unpoller_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: OnUnpollerRelease
on:
workflow_dispatch:
inputs:
unpoller_version:
description: 'Version of unpoller released'
required: true
type: string

jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: yq - portable yaml processor
uses: mikefarah/[email protected]

- name: Update helm values
run: |
UNPOLLER_VERSION=${{ github.event.inputs.unpoller_version }}
yq -i ".appVersion=\"${UNPOLLER_VERSION}\"" charts/unpoller/Chart.yaml
yq -i ".version=\"${UNPOLLER_VERSION}\"" charts/unpoller/Chart.yaml
make helm-docs
cp charts/unpoller/README.md README.MD
git add charts
git add README.MD
git commit -m "chore(unpoller): Updated chart and app version to ${UNPOLLER_VERSION}}"
git push
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
# run only against tags
tags:
- '*'

permissions:
contents: write
packages: write

jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
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 "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion charts/unpoller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# this is set to the major version compatible, if you want to pin this, you must override it
tag: "v2"
tag: ""

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 51d447f

Please sign in to comment.