Skip to content

Commit c523a0c

Browse files
committed
Push images to aurora for simulator and isar
1 parent e716e26 commit c523a0c

File tree

1 file changed

+140
-8
lines changed

1 file changed

+140
-8
lines changed

.github/workflows/publish_docker_image.yml

Lines changed: 140 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ on:
1515
workflow_dispatch:
1616

1717
env:
18-
REGISTRY: ghcr.io
19-
IMAGE_NAME: ${{ github.repository }}
18+
GITHUB_REGISTRY: ghcr.io
19+
GITHUB_IMAGE_NAME: ${{ github.repository }}
20+
AURORA_DEV_REGISTRY: auroradevacr.azurecr.io
21+
AURORA_DEV_IMAGE_NAME: robotics/isar-turtlebot
22+
AURORA_PROD_REGISTRY: auroraprodacr.azurecr.io
23+
AURORA_PROD_IMAGE_NAME: robotics/isar-turtlebot
2024

2125
jobs:
22-
build-and-push-simulator:
26+
build-and-push-simulator-ghcr:
2327
runs-on: ubuntu-latest
2428
permissions:
2529
contents: read
@@ -32,15 +36,15 @@ jobs:
3236
- name: Log in to the Container registry
3337
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
3438
with:
35-
registry: ${{ env.REGISTRY }}
39+
registry: ${{ env.GITHUB_REGISTRY }}
3640
username: ${{ github.actor }}
3741
password: ${{ secrets.GITHUB_TOKEN }}
3842

3943
- name: Extract metadata (tags, labels) for Docker
4044
id: meta
4145
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
4246
with:
43-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-simulator
47+
images: ${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }}-simulator
4448

4549
- name: Build and push Docker image
4650
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
@@ -51,7 +55,71 @@ jobs:
5155
tags: ${{ steps.meta.outputs.tags }}
5256
labels: ${{ steps.meta.outputs.labels }}
5357

54-
build-and-push-isar-with-turtlebot:
58+
build-and-push-simulator-to-auroradevacr:
59+
runs-on: ubuntu-latest
60+
permissions:
61+
contents: read
62+
packages: write
63+
64+
steps:
65+
- name: Checkout repository
66+
uses: actions/checkout@v3
67+
68+
- name: Log in to the Aurora Dev Container registry
69+
uses: docker/login-action@v2
70+
with:
71+
registry: ${{ env.AURORA_DEV_REGISTRY }}
72+
username: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }}
73+
password: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }}
74+
75+
- name: Extract metadata (tags, labels) for Docker
76+
id: meta
77+
uses: docker/metadata-action@v4
78+
with:
79+
images: ${{ env.AURORA_DEV_REGISTRY }}/${{ env.AURORA_DEV_IMAGE_NAME }}-simulator
80+
81+
- name: Build and push Docker image
82+
uses: docker/build-push-action@v3
83+
with:
84+
context: .
85+
file: Dockerfile.Simulator
86+
push: true
87+
tags: ${{ steps.meta.outputs.tags }}
88+
labels: ${{ steps.meta.outputs.labels }}
89+
90+
build-and-push-simulator-to-auroraprodacr:
91+
runs-on: ubuntu-latest
92+
permissions:
93+
contents: read
94+
packages: write
95+
96+
steps:
97+
- name: Checkout repository
98+
uses: actions/checkout@v3
99+
100+
- name: Log in to the Aurora Prod Container registry
101+
uses: docker/login-action@v2
102+
with:
103+
registry: ${{ env.AURORA_PROD_REGISTRY }}
104+
username: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }}
105+
password: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }}
106+
107+
- name: Extract metadata (tags, labels) for Docker
108+
id: meta
109+
uses: docker/metadata-action@v4
110+
with:
111+
images: ${{ env.AURORA_PROD_REGISTRY }}/${{ env.AURORA_PROD_IMAGE_NAME }}-simulator
112+
113+
- name: Build and push Docker image
114+
uses: docker/build-push-action@v3
115+
with:
116+
context: .
117+
file: Dockerfile.Simulator
118+
push: true
119+
tags: ${{ steps.meta.outputs.tags }}
120+
labels: ${{ steps.meta.outputs.labels }}
121+
122+
build-and-push-isar-with-turtlebot-to-ghcr:
55123
runs-on: ubuntu-latest
56124
permissions:
57125
contents: read
@@ -64,15 +132,79 @@ jobs:
64132
- name: Log in to the Container registry
65133
uses: docker/login-action@v2
66134
with:
67-
registry: ${{ env.REGISTRY }}
135+
registry: ${{ env.GITHUB_REGISTRY }}
68136
username: ${{ github.actor }}
69137
password: ${{ secrets.GITHUB_TOKEN }}
70138

71139
- name: Extract metadata (tags, labels) for Docker
72140
id: meta
73141
uses: docker/metadata-action@v4
74142
with:
75-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
143+
images: ${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }}
144+
145+
- name: Build and push Docker image
146+
uses: docker/build-push-action@v3
147+
with:
148+
context: .
149+
file: Dockerfile.Isar
150+
push: true
151+
tags: ${{ steps.meta.outputs.tags }}
152+
labels: ${{ steps.meta.outputs.labels }}
153+
154+
build-and-push-isar-turtlebot-image-to-auroradevacr:
155+
runs-on: ubuntu-latest
156+
permissions:
157+
contents: read
158+
packages: write
159+
160+
steps:
161+
- name: Checkout repository
162+
uses: actions/checkout@v3
163+
164+
- name: Log in to the Aurora Dev Container registry
165+
uses: docker/login-action@v2
166+
with:
167+
registry: ${{ env.AURORA_DEV_REGISTRY }}
168+
username: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }}
169+
password: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }}
170+
171+
- name: Extract metadata (tags, labels) for Docker
172+
id: meta
173+
uses: docker/metadata-action@v4
174+
with:
175+
images: ${{ env.AURORA_DEV_REGISTRY }}/${{ env.AURORA_DEV_IMAGE_NAME }}
176+
177+
- name: Build and push Docker image
178+
uses: docker/build-push-action@v3
179+
with:
180+
context: .
181+
file: Dockerfile.Isar
182+
push: true
183+
tags: ${{ steps.meta.outputs.tags }}
184+
labels: ${{ steps.meta.outputs.labels }}
185+
186+
build-and-push-isar-turtlebot-image-to-auroraprodacr:
187+
runs-on: ubuntu-latest
188+
permissions:
189+
contents: read
190+
packages: write
191+
192+
steps:
193+
- name: Checkout repository
194+
uses: actions/checkout@v3
195+
196+
- name: Log in to the Aurora Prod Container registry
197+
uses: docker/login-action@v2
198+
with:
199+
registry: ${{ env.AURORA_PROD_REGISTRY }}
200+
username: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }}
201+
password: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }}
202+
203+
- name: Extract metadata (tags, labels) for Docker
204+
id: meta
205+
uses: docker/metadata-action@v4
206+
with:
207+
images: ${{ env.AURORA_PROD_REGISTRY }}/${{ env.AURORA_PROD_IMAGE_NAME }}
76208

77209
- name: Build and push Docker image
78210
uses: docker/build-push-action@v3

0 commit comments

Comments
 (0)