Skip to content

Add workflow to push to GHCR #48

Add workflow to push to GHCR

Add workflow to push to GHCR #48

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
build:
name: Build docker image
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
if: ${{ github.ref == 'refs/heads/dev' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build Docker image (and push on dev)
uses: docker/build-push-action@v4.0.0
with:
push: ${{ github.ref == 'refs/heads/dev' }}
tags: ghcr.io/cthit/nollk.it:latest