Skip to content

Create docker-image.yml #3

Create docker-image.yml

Create docker-image.yml #3

Workflow file for this run

on:
push:
branches: [master]
pull_request:
branches: [master]
name: "CI"
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
tags: ghcr.io/cthit/eatit:latest