-
Notifications
You must be signed in to change notification settings - Fork 11
149 lines (149 loc) · 4.61 KB
/
build-images.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Build images
on:
push:
branches: [wip-deploy]
paths:
- dockerfiles/**
- src/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
env:
IMAGE_NS: ghcr.io/open-rmf/rmf_deployment_template/rmf-deployment
IMAGE_TAG: ${{ github.sha }}
IMAGE_TAG_LATEST: latest
jobs:
builder:
name: builder
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/builder:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/builder:$IMAGE_TAG_LATEST
docker build -t $IMAGE dockerfiles/builder
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST
rmf:
name: rmf
runs-on: ubuntu-latest
needs: builder
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/rmf:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/rmf:$IMAGE_TAG_LATEST
BUILDER_IMAGE=$IMAGE_NS/builder:$IMAGE_TAG
. dockerfiles/build-args.sh
docker build -t $IMAGE $RMF_BUILD_ARGS dockerfiles/rmf
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST
rmf-site:
name: rmf-site
runs-on: ubuntu-latest
needs: rmf
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/rmf-site:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/rmf-site:$IMAGE_TAG_LATEST
BUILDER_IMAGE=$IMAGE_NS/rmf:$IMAGE_TAG
. dockerfiles/build-args.sh
docker build -t $IMAGE $RMF_SITE_BUILD_ARGS dockerfiles/rmf-site
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST
api_server:
name: api-server
runs-on: ubuntu-latest
needs: builder
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/api-server:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/api-server:$IMAGE_TAG_LATEST
BUILDER_IMAGE=$IMAGE_NS/builder:$IMAGE_TAG
. dockerfiles/build-args.sh
docker build -t $IMAGE $API_SERVER_BUILD_ARGS dockerfiles/rmf-web/api-server
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST
dashboard:
name: dashboard
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/dashboard:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/dashboard:$IMAGE_TAG_LATEST
. dockerfiles/build-args.sh
docker build -t $IMAGE $DASHBOARD_BUILD_ARGS dockerfiles/rmf-web/dashboard
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST
keycloak_setup:
name: keycloak-setup
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: checkout
uses: actions/checkout@v4
- name: build and push
run: |
IMAGE=$IMAGE_NS/keycloak-setup:$IMAGE_TAG
IMAGE_LATEST=$IMAGE_NS/keycloak-setup:$IMAGE_TAG_LATEST
docker build -t $IMAGE dockerfiles/rmf-web/keycloak-setup
docker push $IMAGE
docker tag $IMAGE $IMAGE_LATEST
docker push $IMAGE_LATEST