Skip to content

Commit

Permalink
separated docker and helm release, helm now only triggers when a merg…
Browse files Browse the repository at this point in the history
…e to main includes a change to the Chart.yaml
  • Loading branch information
mschenck committed Oct 10, 2022
1 parent 822b943 commit 782953b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 98 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Release

on:
push:
branches:
- main
# TODO: Should be scoped to tag pushes eventually

jobs:
docker_release:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
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: Log in to Docker Hub
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: ngrok/ngrok-ingress-controller:latest
37 changes: 37 additions & 0 deletions .github/workflows/helm_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Helm Release

on:
push:
branches:
- main
- mschenck/12686/helm-release-workflow
paths:
- 'helm/ingress-controller/Chart.yaml'

jobs:
helm_release:
needs: helm_bump_version
runs-on: ubuntu-latest

steps:
- name: Checkout repo
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@v3
with:
version: v3.10.0

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.1
with:
charts_dir: helm
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98 changes: 0 additions & 98 deletions .github/workflows/release.yaml

This file was deleted.

0 comments on commit 782953b

Please sign in to comment.