Add publishing

This commit is contained in:
Knut Ahlers 2024-09-16 19:52:25 +02:00
parent 95001487b6
commit 8da2f421e3
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

47
.github/workflows/docker.yaml vendored Normal file
View file

@ -0,0 +1,47 @@
---
name: CI Workflow
on: push
permissions:
contents: read
jobs:
docker-publish:
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Log into registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
run: |
docker buildx build \
--no-cache \
--pull \
--tag ghcr.io/${GITHUB_REPOSITORY,,}:latest \
.
- name: Docker Push
run: |
docker push ghcr.io/${GITHUB_REPOSITORY,,}:latest
if: ${{ github.ref == 'refs/heads/master' }}
...