Skip to content

Commit

Permalink
👷add controlpanel docker images workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TarradeMarc committed Feb 11, 2025
1 parent 57c34e3 commit 8ed30b9
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/publish-controlpanel-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create and publish Docker image for controlpanel API to ghcr.io

on:
release:
types: ['published']

env:
REGISTRY: ghcr.io
IMAGE_NAME: SAP/controlpanel-api

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

environment: ghcr:cloud-active-defense

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata of controlpanel API
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image of controlpanel API
id: push
uses: docker/[email protected]
with:
context: ./controlpanel/api
push: true
file: ./controlpanel/api/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
47 changes: 47 additions & 0 deletions .github/workflows/publish-controlpanel-frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create and publish Docker image for controlpanel Frontend to ghcr.io

on:
release:
types: ['published']

env:
REGISTRY: ghcr.io
IMAGE_NAME: SAP/controlpanel-frontend

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

environment: ghcr:cloud-active-defense

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata of controlpanel frontend
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image of controlpanel frontend
id: push
uses: docker/[email protected]
with:
context: ./controlpanel/cad
push: true
file: ./controlpanel/cad/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8ed30b9

Please sign in to comment.