Skip to content

build fixes

build fixes #24

Workflow file for this run

name: Docker Publish
on:
push:
branches:
- master
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Git Tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build and push Docker image with tag
if: env.GIT_TAG != ''
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.GIT_TAG }}
build-args: |
BUILD_TAG=${{ env.GIT_TAG }}
- name: Build and push Docker image with latest
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest