tangled
alpha
login
or
join now
alpine.girlfag.club
/
refbot
0
fork
atom
SpinShare Referee Bot
refbot.ellite.dev/overlay
0
fork
atom
overview
issues
pulls
pipelines
kaniko safe me
alpinesystem
3 weeks ago
479cd584
da2b2044
0/1
buildnpush.yml
failed
11s
+9
-24
1 changed file
expand all
collapse all
unified
split
.tangled
workflows
buildnpush.yml
+9
-24
.tangled/workflows/buildnpush.yml
reviewed
···
7
7
dependencies:
8
8
nixpkgs:
9
9
- curl
10
10
-
- buildah
10
10
+
- kaniko
11
11
- nodejs
12
12
-
- shadow
13
13
-
14
14
-
environment:
15
15
-
BUILDAH_ISOLATION: "chroot"
16
16
-
STORAGE_DRIVER: "vfs"
17
12
18
13
steps:
19
19
-
- name: Setup user environment
20
20
-
command: |
21
21
-
echo "root:x:0:0:root:/root:/bin/sh" >> /etc/passwd
22
22
-
echo "root:x:0:" >> /etc/group
23
23
-
24
24
-
- name: Get version from package.json
14
14
+
- name: Build and push Docker image
25
15
command: |
26
16
export VERSION=$(node -p "require('./package.json').version")
27
27
-
28
28
-
- name: Build Docker Image
29
29
-
command: |
30
30
-
buildah build -t registry.ellite.dev/alpinesystem/refbot:latest -t registry.ellite.dev/alpinesystem/refbot:v$VERSION .
31
31
-
32
32
-
- name: Push Docker Image
33
33
-
command: |
34
34
-
buildah push --creds=refbot:$REGISTRY_PASSWORD registry.ellite.dev/alpinesystem/refbot docker://registry.ellite.dev/alpinesystem/refbot
35
35
-
36
36
-
- name: Trigger Portainer redeploy
37
37
-
command: |
38
38
-
curl -X POST https://portainer.ellite.dev/api/stacks/webhooks/729bf24e-a305-4eaf-8efc-de31043519bb
17
17
+
mkdir -p /kaniko/.docker
18
18
+
echo "{\"auths\":{\"registry.ellite.dev\":{\"username\":\"refbot\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
19
19
+
executor \
20
20
+
--context=dir://$(pwd) \
21
21
+
--dockerfile=$(pwd)/Dockerfile \
22
22
+
--destination=registry.ellite.dev/alpinesystem/refbot:latest \
23
23
+
--destination=registry.ellite.dev/alpinesystem/refbot:v$VERSION