Skip to content

Commit ff9e891

Browse files
authored
Merge pull request #66 from cthit/feature/github-workflows
Add workflow to push to GHCR
2 parents aeec3e9 + a5e6f7f commit ff9e891

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/docker-image.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker Image CI
1+
name: Docker
22

33
on:
44
push:
@@ -7,12 +7,28 @@ on:
77
branches: [ "dev" ]
88

99
jobs:
10-
1110
build:
11+
name: Build image
1212

1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Build the Docker image
18-
run: docker build . --file Dockerfile --tag nollk-it:githubtest
16+
-
17+
uses: actions/checkout@v3
18+
-
19+
name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
-
22+
name: Login to GitHub Container Registry
23+
if: ${{ github.ref == 'refs/heads/dev' }}
24+
uses: docker/login-action@v2
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.repository_owner }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
-
30+
name: Build Docker image (and push on dev)
31+
uses: docker/build-push-action@v4.0.0
32+
with:
33+
push: ${{ github.ref == 'refs/heads/dev' }}
34+
tags: ghcr.io/cthit/nollk.it:latest

0 commit comments

Comments
 (0)