add docker build action

This commit is contained in:
MarconLP 2023-07-16 19:21:48 +02:00
parent cb80d74138
commit 32f37e5526
No known key found for this signature in database
GPG key ID: F4CAFFDFA3451D5E

29
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: docker
on:
push:
branches:
- 'main'
jobs:
build-and-publish:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image to ghcr.io
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/marconlp/snapify:latest