Skip to content

cniweb builds a new image for apifant swagger editor #48

cniweb builds a new image for apifant swagger editor

cniweb builds a new image for apifant swagger editor #48

Workflow file for this run

name: Docker Image
run-name: ${{ github.actor }} builds a new image for apifant swagger editor
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
EDITOR_IMAGE: ghcr.io/huk-coburg/apifant-editor
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate Docker Image Tag
run: echo "EDITOR_TAG=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
- name: Build the Docker Image
run: docker build --file Dockerfile --tag ${EDITOR_IMAGE}:${EDITOR_TAG} .
- name: Tag the Docker Image
run: docker tag ${EDITOR_IMAGE}:${EDITOR_TAG} ${EDITOR_IMAGE}:latest
- name: Docker Login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin
- name: Push CI Tag
run: docker push ${EDITOR_IMAGE}:${EDITOR_TAG}
- name: Push Latest Tag
run: docker push ${EDITOR_IMAGE}:latest