This commit is contained in:
@@ -13,20 +13,14 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release:
|
build-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: nixos
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v26
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: Build Docker Image via Nix Flake
|
- name: Build Docker Image via Nix Flake
|
||||||
run: |
|
run: |
|
||||||
export HOME=$TMPDIR
|
nix build ./build/#dockerImage
|
||||||
nix build --impure ./build/#dockerImage
|
|
||||||
docker load -i result
|
docker load -i result
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
@@ -40,19 +34,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.run_number }}
|
VERSION=${{ github.run_number }}
|
||||||
TARGET_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
TARGET_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
nix shell nixpkgs#docker
|
||||||
# Replace 'nix-built-image:latest' with your flake's internal image name
|
# Replace 'nix-built-image:latest' with your flake's internal image name
|
||||||
docker tag nix-built-image:latest $TARGET_IMAGE:$VERSION
|
docker tag nix-built-image:latest $TARGET_IMAGE:$VERSION
|
||||||
docker push $TARGET_IMAGE:$VERSION
|
docker push $TARGET_IMAGE:$VERSION
|
||||||
|
|
||||||
- name: Setup Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
with:
|
|
||||||
version: v3.14.0
|
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.run_number }}
|
VERSION=${{ github.run_number }}
|
||||||
|
|
||||||
|
nix shell nixpkgs#kubernetes-helm
|
||||||
# Packages the chart using the dynamically injected repo name
|
# Packages the chart using the dynamically injected repo name
|
||||||
helm package ops/chart --version $VERSION --app-version $VERSION
|
helm package ops/chart --version $VERSION --app-version $VERSION
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user