41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
name: Image Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
|
|
jobs:
|
|
prepare:
|
|
name: Prepare to Build
|
|
runs-on: ubuntu-latest-docker
|
|
container:
|
|
image: node:22
|
|
steps:
|
|
- name: Install deps
|
|
run: apt update && apt -y install sudo
|
|
- uses: actions/checkout@v4
|
|
# - name: Install Nix
|
|
# uses: https://github.com/DeterminateSystems/nix-installer-action@v12
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v27
|
|
# with:
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- name: Run the Magic Nix Cache
|
|
uses: https://github.com/DeterminateSystems/magic-nix-cache-action@v7
|
|
- name: Build release
|
|
run: nix build .#container --impure
|
|
- name: list
|
|
run: ls .
|
|
- name: push
|
|
run: docker load < result
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: code.252.no
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name:
|
|
run: |
|
|
docker tag alertmanager-ntfy:1.0.0 code.252.no/tommy/alertmanager-ntfy:1.0.0
|
|
docker push alertmanager-ntfy:1.0.0
|