Skip to content

Commit

Permalink
ci: adds github workflow that builds container image
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtcoder17 committed Dec 16, 2024
1 parent f421311 commit 4f68573
Showing 1 changed file with 50 additions and 0 deletions.
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: Release

on:
workflow_dispatch:
inputs:
image_tag:
type: string
description: "image_tag"
required: true
default: ""

push:

permissions:
contents: read
packages: write

jobs:
build-image:
runs-on: ubuntu-latest
name: plugin/helm-charts image
steps:
- uses: actions/checkout@v4

- uses: kloudlite/actions/setup-cache-go@v1
with:
cache_key: "run-${{ matrix.platform }}-${{ matrix.arch }}"
working_directory: .

- uses: kloudlite/actions/generate-image-tag@v1

- uses: kloudlite/actions/setup-nix-cachix@v1
with:
flake_lock: "./flake.lock"
nix_develop_arguments: ".#default"
cachix_cache_name: ${{ secrets.CACHIX_CACHE_NAME }}
cachix_auth_token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: kloudlite/actions/setup-docker@v1
with:
docker_registry: "ghcr.io"
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Binary
shell: bash
env:
IMAGE: "ghcr.io/${{ github.repository }}:$IMAGE_TAG"
run: |+
run build image=$IMAGE

0 comments on commit 4f68573

Please sign in to comment.