Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 607393d

Browse files
authored
ci(docker): push on release (#52)
* ci(docker): push on release * fix(ci): just syntax
1 parent c9d7249 commit 607393d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Build and Push Docker Image
22

33
on:
4+
release:
5+
types: [published]
46
push:
5-
branches:
6-
- main
7-
- feat/add-nix-package
87
workflow_dispatch:
98

109
jobs:
@@ -15,18 +14,26 @@ jobs:
1514
- name: Check out repository
1615
uses: actions/checkout@v3
1716

17+
- name: Set up just
18+
uses: extractions/setup-just@v3
19+
1820
- name: Set up Nix
1921
uses: cachix/install-nix-action@v25
2022
with:
2123
nix_path: nixpkgs=channel:nixos-unstable
2224
extra_nix_config: |
2325
experimental-features = nix-command flakes
2426
25-
- name: Run Nix development shell and build/push image
27+
- name: Build image
28+
run: |
29+
just nix::develop just image build
30+
31+
- name: Push image
32+
if: ${{ github.event_name == 'release' }}
2633
env:
2734
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2835
run: |
29-
nix develop ./tools/nix#default --accept-flake-config --command bash -c '
36+
just nix::develop bash -c '
3037
echo "$GITHUB_TOKEN" | skopeo login ghcr.io -u $GITHUB_ACTOR --password-stdin
3138
just image push
3239
'

0 commit comments

Comments
 (0)