File tree Expand file tree Collapse file tree 3 files changed +75
-41
lines changed Expand file tree Collapse file tree 3 files changed +75
-41
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+
2
+ on : push
3
+
4
+ name : build
5
+
6
+ jobs :
7
+ build :
8
+ name : Build Docker images
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ - name : Build directory-api image
13
+ run : |
14
+ cd api
15
+ docker build \
16
+ --no-cache \
17
+ --tag ghcr.io/spaceapi/directory-api \
18
+ --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
19
+ .
20
+ - name : Build directory-collector image
21
+ run : |
22
+ cd collector
23
+ docker build \
24
+ --no-cache \
25
+ --tag ghcr.io/spaceapi/directory-collector \
26
+ --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
27
+ .
Original file line number Diff line number Diff line change
1
+
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ schedule :
7
+ - cron : " 0 4 * * 1" # weekly
8
+
9
+ name : publish
10
+
11
+ jobs :
12
+ publish :
13
+ name : Publish Docker images
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - name : Login to GitHub Container Registry
18
+ uses : docker/login-action@v3
19
+ with :
20
+ registry : ghcr.io
21
+ username : ${{ github.actor }}
22
+ password : ${{ secrets.GITHUB_TOKEN }}
23
+ - name : Build directory-api image
24
+ run : |
25
+ cd api
26
+ docker build \
27
+ --no-cache \
28
+ --tag ghcr.io/spaceapi/directory-api \
29
+ --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
30
+ .
31
+ - name : Publish directory-api image
32
+ run : |
33
+ docker tag ghcr.io/spaceapi/directory-api ghcr.io/spaceapi/directory-api:$GITHUB_SHA
34
+ docker push ghcr.io/spaceapi/directory-api:$GITHUB_SHA
35
+ docker push ghcr.io/spaceapi/directory-api:latest
36
+ - name : Build directory-collector image
37
+ run : |
38
+ cd collector
39
+ docker build \
40
+ --no-cache \
41
+ --tag ghcr.io/spaceapi/directory-collector \
42
+ --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
43
+ .
44
+ - name : Publish directory-collector image
45
+ run : |
46
+ docker tag ghcr.io/spaceapi/directory-collector ghcr.io/spaceapi/directory-collector:$GITHUB_SHA
47
+ docker push ghcr.io/spaceapi/directory-collector:$GITHUB_SHA
48
+ docker push ghcr.io/spaceapi/directory-collector:latest
You can’t perform that action at this time.
0 commit comments