Skip to content

added Dockerfile

added Dockerfile #3

name: Build and Push to GHCR
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push Docker image
run: |
docker build . -t ghcr.io/${{ github.repository_owner }}/app:latest
docker push ghcr.io/${{ github.repository_owner }}/app:latest