Skip to content

Commit

Permalink
Add release workflow to build and publish image
Browse files Browse the repository at this point in the history
  • Loading branch information
kishen-v committed Oct 16, 2023
1 parent 0822fc4 commit b80279d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build release image

on:
release:
types:
- created

env:
GHCR_IMAGE: ghcr.io/${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.GHCR_IMAGE }}

- name: Build and push
uses: docker/build-push-action@v5
with:
file: Containerfile
context: .
platforms: linux/ppc64le
push: true
tags: |
${{ steps.meta.outputs.tags }}
${{ env.GHCR_IMAGE }}:latest
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

2 changes: 1 addition & 1 deletion deployment/kubesentry-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: kube-sentry
image: quay.io/kviswana/kube-sentry:0.1
image: ghcr.io/ppc64le-cloud/kube-sentry:v0.1
env:
- name: VERBOSITY
value: "0"
Expand Down

0 comments on commit b80279d

Please sign in to comment.