add ghcr action

This commit is contained in:
Jan Koppe 2021-10-30 09:20:03 +02:00
parent 8e1e8b3925
commit c6a9034be1
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
1 changed files with 31 additions and 0 deletions

31
.github/workflows/build-and-publish.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Build and Publish
on:
push:
branches:
- 'main'
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/chaoswest-tv/concierge:latest