Skip to content

Merge pull request #8 from hpi-schul-cloud/N21-1563-ldap-sync-multi-t… #29

Merge pull request #8 from hpi-schul-cloud/N21-1563-ldap-sync-multi-t…

Merge pull request #8 from hpi-schul-cloud/N21-1563-ldap-sync-multi-t… #29

Workflow file for this run

name: Docker for single school ldap sim
on:
push:
branches: [ main ]
tags:
- '*'
workflow_dispatch:
create:
tags:
- '*'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: hpi-schul-cloud/sc-openldap-single
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
build-args: |
SCHOOL_NAME_BASE=schoolOne
GENERATE_DATA=true
NUMBER_OF_SCHOOLS=2
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}