Skip to content

Commit

Permalink
Merge pull request #3 from kkirara/helm-release
Browse files Browse the repository at this point in the history
Helm release workflow
  • Loading branch information
brainfair authored Oct 15, 2022
2 parents e01464f + 07741dc commit 21e2074
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 38 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/cd.yml → .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
Expand Down Expand Up @@ -39,3 +36,9 @@ jobs:
python -m pytest
env:
FLASK_APP: kubelinks_app.__init__
- name: Build without push
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: smitkirara/kubelinks:v0.0.${{ github.run_number }}-dev
35 changes: 0 additions & 35 deletions .github/workflows/ci.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build docker image and release helm chart

on:
push:
branches:
- master
tags:
- v*

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: smitkirara/kubelinks:${{ github.ref }}

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

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Update Helm Chart Values
uses: Nextdoor/helm-set-image-tag-action@main
with:
verbose: true
tag: ${{ github.ref }}
values: charts/kubelinks/values.yaml
keys: .image.tag
bump_level: patch
commit_branch: master

- name: Install Helm
uses: azure/setup-helm@v3

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 21e2074

Please sign in to comment.