Skip to content

Build and push Docker Image on Tag #8

Build and push Docker Image on Tag

Build and push Docker Image on Tag #8

---
name: Build and push Docker Image on Tag
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
pre_build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
suffix: ${{ steps.tag.outputs.suffix }}
steps:
- name: Filter Tag name
uses: olegtarasov/[email protected]
id: tag
with:
tagRegex: "(?<tag>[0-9]+.[0-9]+.[0-9]+)"
build_and_push_postfix:
permissions:
packages: write
security-events: write
actions: read
contents: read
needs: pre_build
uses: hpi-schul-cloud/infra-tools/.github/workflows/build-and-push.yaml@master
with:
registry: ghcr.io
image: dbildungsplattform/mail-relay-server
file: Dockerfile.postfix
tag: ${{ needs.pre_build.outputs.tag }}
suffix: ${{ needs.pre_build.outputs.suffix }}
build_and_push_exporter:
permissions:
packages: write
security-events: write
actions: read
contents: read
needs: pre_build
uses: hpi-schul-cloud/infra-tools/.github/workflows/build-and-push.yaml@master
with:
registry: ghcr.io
image: dbildungsplattform/mail-relay-server-exporter
file: Dockerfile.exporter
tag: ${{ needs.pre_build.outputs.tag }}
suffix: ${{ needs.pre_build.outputs.suffix }}