Skip to content

Fix startup

Fix startup #33

Workflow file for this run

name: Docker Image CI
on:
push:
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: roemer/ut99-server
steps:
- name: Set Image Tag
run: |
if [[ $GITHUB_REF_NAME == 'main' ]]; then
echo "IMAGE_TAG=latest" >> "$GITHUB_ENV"
else
echo "IMAGE_TAG=$GITHUB_REF_NAME" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v3
- name: Build the Docker image
run: docker build -f Dockerfile -t $IMAGE_NAME:$IMAGE_TAG --no-cache .
- name: Docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Docker push
run: docker push $IMAGE_NAME:$IMAGE_TAG
- name: Docker logout
run: docker logout