Skip to content

Commit 649e8f2

Browse files
authored
Create docker-image.yml (#95)
* Create docker-image.yml * Update docker-image.yml
1 parent eaeae99 commit 649e8f2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches: [master]
4+
pull_request:
5+
branches: [master]
6+
7+
name: "CI"
8+
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/setup-buildx-action@v2
19+
- name: Login to GitHub Container Registry
20+
if: ${{ github.ref == 'refs/heads/master' }}
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.repository_owner }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Build and push
27+
id: docker_build
28+
uses: docker/build-push-action@v2
29+
with:
30+
context: ./
31+
file: ./Dockerfile
32+
push: ${{ github.ref == 'refs/heads/master' }}
33+
tags: ghcr.io/cthit/eatit:latest

0 commit comments

Comments
 (0)