Skip to content

Commit 8ed30b9

Browse files
committed
👷add controlpanel docker images workflow
1 parent 57c34e3 commit 8ed30b9

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Create and publish Docker image for controlpanel API to ghcr.io
2+
3+
on:
4+
release:
5+
types: ['published']
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: SAP/controlpanel-api
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
attestations: write
18+
id-token: write
19+
20+
environment: ghcr:cloud-active-defense
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Log in to the Container registry
27+
uses: docker/[email protected]
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata of controlpanel API
34+
id: meta
35+
uses: docker/[email protected]
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
39+
- name: Build and push Docker image of controlpanel API
40+
id: push
41+
uses: docker/[email protected]
42+
with:
43+
context: ./controlpanel/api
44+
push: true
45+
file: ./controlpanel/api/Dockerfile
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Create and publish Docker image for controlpanel Frontend to ghcr.io
2+
3+
on:
4+
release:
5+
types: ['published']
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: SAP/controlpanel-frontend
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
attestations: write
18+
id-token: write
19+
20+
environment: ghcr:cloud-active-defense
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Log in to the Container registry
27+
uses: docker/[email protected]
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata of controlpanel frontend
34+
id: meta
35+
uses: docker/[email protected]
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
39+
- name: Build and push Docker image of controlpanel frontend
40+
id: push
41+
uses: docker/[email protected]
42+
with:
43+
context: ./controlpanel/cad
44+
push: true
45+
file: ./controlpanel/cad/Dockerfile
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)