Skip to content

Commit

Permalink
build images and chart repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonoughe committed May 14, 2022
1 parent 40d1ab7 commit 681df32
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]

env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_REGISTRY }}/porkbun-webhook

- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: porkbun-webhook
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
containerfiles: |
./Dockerfile
- name: Push image
if: github.event_name != 'pull_request'
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build-image.outputs.tags }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
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 "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deploy
2 changes: 1 addition & 1 deletion deploy/porkbun-webhook/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Porkbun solver for Cert Manager.
name: porkbun-webhook
version: 0.1.0
version: 0.1.1
4 changes: 2 additions & 2 deletions deploy/porkbun-webhook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ certManager:
serviceAccountName: cert-manager

image:
repository: mdonoughe/porkbun-webhook
tag: latest
repository: ghcr.io/mdonoughe/porkbun-webhook
tag: v0.1.1
pullPolicy: IfNotPresent

nameOverride: ""
Expand Down

0 comments on commit 681df32

Please sign in to comment.