Skip to content
name: Create and publish Docker image for configmanager to ghcr.io
on:
release:
types: ['published']
env:
REGISTRY: ghcr.io
IMAGE_NAME: SAP/configmanager
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/login-action@v3.2.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata of configmanager
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image of configmanager
id: push
uses: docker/build-push-action@v5.3.0
with:
context: ./configmanager
push: true
file: ./configmanager/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}