Skip to content

Commit 609fdd9

Browse files
authored
Use nix docker tooling to build images (#91)
This PR includes: - Build all the docker images both for production and testing using nix dockerTools. - Update the docker docs - Update the justfile commands adding a new nix module to improve the organization - Remove all the dockerfiles
2 parents 38da446 + 5c5279d commit 609fdd9

26 files changed

+593
-583
lines changed

.github/workflows/push-docker.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Push Client Image
2+
on:
3+
check_suite:
4+
types: [completed]
5+
6+
jobs:
7+
push-docker-image:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up Nix
15+
uses: cachix/install-nix-action@v27
16+
with:
17+
extra_nix_config: |
18+
accept-flake-config = true
19+
substituters = https://cache.garnix.io https://cache.nixos.org/
20+
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
21+
22+
- name: Download image from Garnix cache
23+
run: |
24+
nix build .#docker-psyche-solana-client --no-link --print-out-paths > image-path.txt
25+
26+
- uses: DeterminateSystems/nix-installer-action@main
27+
- uses: DeterminateSystems/magic-nix-cache-action@main
28+
29+
- name: Login to Docker Hub
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ vars.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKER_DEPLOY_KEY }}
34+
35+
- run: scripts/push-client-image.sh
36+
env:
37+
DOCKER_REPOSITORY: ${{ vars.DOCKERHUB_REPO }}

0 commit comments

Comments
 (0)