Skip to content

Commit 1858434

Browse files
Create docker.yml
1 parent 89afba8 commit 1858434

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Login to GHCR
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Build and push
23+
uses: docker/build-push-action@v3
24+
with:
25+
context: .
26+
push: true
27+
tags: ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:latest

0 commit comments

Comments
 (0)