Skip to content

Merge pull request #268 from openebs/pre-commit-ci-update-config #175

Merge pull request #268 from openebs/pre-commit-ci-update-config

Merge pull request #268 from openebs/pre-commit-ci-update-config #175

Workflow file for this run

name: Container Images
on:
push:
branches:
- develop
- "release/**"
workflow_call:
inputs:
registry:
required: false
type: string
default: docker.io
namespace:
required: false
type: string
default: openebs
env:
CI: 1
jobs:
image-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
- name: "Extract NIX_PATH"
id: nixpath
run: |
echo "nix_path=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_OUTPUT
- uses: cachix/install-nix-action@v31
with:
nix_path: "${{ steps.nixpath.outputs.nix_path }}"
install_options: --no-daemon
extra_nix_config: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ hashFiles('shell.nix', 'nix/*') }}
restore-prefixes-first-match: nix-
- run: nix-build shell.nix
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host
- name: Build
env:
CI_TEST: "false"
CI_IMAGE_NS: ${{ inputs.namespace }}
DNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DPASS: ${{ secrets.DOCKERHUB_TOKEN }}
DREG: ${{ inputs.registry }}
run: nix-shell --run ".ci/build.sh"