@@ -21,14 +21,62 @@ jobs:
21
21
- name : Run Biome
22
22
run : biome ci .
23
23
24
- build-test-deploy :
25
- name : Build, Test and Deploy
24
+ test :
25
+ name : Test
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - name : Checkout
29
+ uses : actions/checkout@v4
30
+
31
+ - name : Run Tests
32
+ run : yarn test
33
+
34
+ - name : Export ActivityPub image to .tar
35
+ run : docker save activitypub -o activitypub.tar
36
+
37
+ - name : Export Migrations image to .tar
38
+ run : docker save migrations -o migrations.tar
39
+
40
+ - name : Upload ActivityPub image to GHA
41
+ uses : actions/upload-artifact@v4
42
+ with :
43
+ name : activitypub.tar
44
+ path : activitypub.tar
45
+
46
+ - name : Upload Migrations image to GHA
47
+ uses : actions/upload-artifact@v4
48
+ with :
49
+ name : migrations.tar
50
+ path : migrations.tar
51
+
52
+ deploy :
53
+ name : Deploy
54
+ needs : [lint, test]
55
+ if : github.ref == 'refs/heads/main'
26
56
environment : build
27
57
runs-on : ubuntu-latest
28
58
steps :
29
- - name : " Checkout"
59
+ - name : Checkout
30
60
uses : actions/checkout@v4
31
61
62
+ - name : Download ActivityPub image from GHA
63
+ uses : actions/download-artifact@v4
64
+ with :
65
+ name : activitypub.tar
66
+ path : activitypub.tar
67
+
68
+ - name : Download Migrations image from GHA
69
+ uses : actions/download-artifact@v4
70
+ with :
71
+ name : migrations.tar
72
+ path : migrations.tar
73
+
74
+ - name : Load ActivityPub image
75
+ run : docker load -i activitypub.tar
76
+
77
+ - name : Load Migrations image
78
+ run : docker load -i migrations.tar
79
+
32
80
- name : ActivityPub Docker meta
33
81
id : activitypub-docker-metadata
34
82
uses : docker/metadata-action@v5
@@ -55,23 +103,6 @@ jobs:
55
103
type=semver,pattern={{major}}
56
104
type=sha,priority=1100
57
105
58
- - name : " Build Docker Image for ActivityPub"
59
- uses : docker/build-push-action@v6
60
- with :
61
- context : .
62
- load : true
63
- tags : ${{ steps.activitypub-docker-metadata.outputs.tags }}
64
-
65
- - name : " Build Docker Image for Migrations"
66
- uses : docker/build-push-action@v6
67
- with :
68
- context : migrate
69
- load : true
70
- tags : ${{ steps.migrations-docker-metadata.outputs.tags }}
71
-
72
- - name : " Run Tests"
73
- run : yarn test
74
-
75
106
- name : " Login to GAR"
76
107
if : github.ref == 'refs/heads/main'
77
108
uses : docker/login-action@v3
81
112
password : ${{ secrets.SERVICE_ACCOUNT_KEY }}
82
113
83
114
- name : " Push ActivityPub Docker Image"
84
- if : github.ref == 'refs/heads/main'
85
115
uses : docker/build-push-action@v6
86
116
with :
87
117
context : .
0 commit comments