Create docker-image.yml

Needs Docker Hub credentials to the GitHub repository secrets (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN). Also needs USER tag to match Docker Hub username.
This commit is contained in:
mikez 2023-04-13 16:00:27 -05:00 committed by GitHub
parent 8c7e483df9
commit 5af6d027c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

27
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/build-push-action@v4
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: USER/sygil-webui:latest