Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/build-docker.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker

on:
push:
branches:
- master
tags:
- '*'

jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2

- name: Build image & push
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[ "$VERSION" == "master" ] && VERSION=latest
docker build -t ghcr.io/${{ github.repository }}:$VERSION .
docker push ghcr.io/${{ github.repository }}:$VERSION
if [ "$VERSION" != "latest" ] ; then
docker tag ghcr.io/${{ github.repository }}:$VERSION ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:latest
fi