Skip to content

Commit

Permalink
Merge pull request #66 from cthit/feature/github-workflows
Browse files Browse the repository at this point in the history
Add workflow to push to GHCR
  • Loading branch information
GAsplund authored Aug 2, 2024
2 parents aeec3e9 + a5e6f7f commit ff9e891
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI
name: Docker

on:
push:
Expand All @@ -7,12 +7,28 @@ on:
branches: [ "dev" ]

jobs:

build:
name: Build image

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag nollk-it:githubtest
-
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/[email protected]
with:
push: ${{ github.ref == 'refs/heads/dev' }}
tags: ghcr.io/cthit/nollk.it:latest

0 comments on commit ff9e891

Please sign in to comment.