Skip to content

Commit d0c9daf

Browse files
authored
Add nix2container workflows for creating payjoin-service docker images (#1321)
2 parents a200095 + d105c5a commit d0c9daf

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Build and publish Docker image"
2+
3+
on:
4+
push:
5+
tags:
6+
- payjoin-service-**
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: "Build and publish Docker image"
12+
strategy:
13+
fail-fast: false
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Install Nix
23+
uses: DeterminateSystems/nix-installer-action@main
24+
25+
- name: Log in to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ github.repository_owner }}
29+
password: ${{ secrets.PAYJOIN_DOCKER_RW }}
30+
31+
- name: Build and release image
32+
run: nix run .#packages.x86_64-linux.payjoin-service-image.copyToRegistry

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@
175175
releasePkg = pkg.overrideAttrs (final: prev: { CARGO_PROFILE = "release"; });
176176
in
177177
nix2containerPkgs.nix2container.buildImage {
178-
inherit name tag;
178+
inherit tag;
179+
name = "docker.io/payjoin/${name}";
179180
copyToRoot = pkgs.buildEnv {
180181
name = "root";
181182
paths = [ releasePkg ];

0 commit comments

Comments
 (0)