Create docker-image.yml

This commit is contained in:
Nicolas Chan 2021-03-20 01:54:43 -07:00 committed by GitHub
parent eb3ced8fbe
commit eb410e1e0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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

@ -0,0 +1,21 @@
name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker build . --file Dockerfile --tag ghcr.io/nicolaschan/minecraft-backup:$GITHUB_SHA
docker push ghcr.io/nicolaschan/minecraft-backup:$GITHUB_SHA