-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
47 lines (39 loc) · 1.26 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
build:
docker buildx build --progress=plain -t rgpeach10/shell:local . --load
run-local:
docker run -it --rm \
-v $HOME/.ssh:/home/root/.ssh \
-v $HOME:/home/root/mnt \
-w /home/root/mnt \
-e GITHUB_TOKEN=$(gh auth token) \
-e MNT=/home/root/mnt \
-e DEBUG=1 \
rgpeach10/shell:local
run-remote tag="local":
docker run -it --rm \
-v $HOME/.ssh:/home/root/.ssh \
-v $HOME:/home/root/mnt \
-w /home/root/mnt \
-e GITHUB_TOKEN=$(gh auth token) \
-e MNT=/home/root/mnt \
--pull=always \
rgpeach10/shell:{{tag}}
build-all tag="local":
docker buildx build --progress=plain -t rgpeach10/shell:{{tag}} --platform linux/amd64,linux/arm64 . --push
test:
just build
just run-local
clean:
docker image prune -f
docker container prune -f
docker system prune -f
docker volume prune -f
push-local: build
echo $(git symbolic-ref --short HEAD | sed 's/\//__/g')
docker tag rgpeach10/shell:local rgpeach10/shell:$(git symbolic-ref --short HEAD | sed 's/\//__/g')
docker push rgpeach10/shell:$(git symbolic-ref --short HEAD | sed 's/\//__/g')
stow:
stow -t $HOME home
stow-hard:
stow -t $HOME --adopt home
git reset --hard