Skip to content

Commit 3ae371a

Browse files
authored
Create docker-image.yml
1 parent feca676 commit 3ae371a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'shuaiplus/nodecrypt'
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Log in to GitHub Container Registry
14+
uses: docker/login-action@v3
15+
with:
16+
registry: ghcr.io
17+
username: ${{ github.actor }}
18+
password: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Build and push Docker image
20+
uses: docker/build-push-action@v4
21+
with:
22+
context: .
23+
push: true
24+
tags: |
25+
ghcr.io/shuaiplus/nodecrypt:latest
26+
ghcr.io/shuaiplus/nodecrypt:${{ github.sha }}

0 commit comments

Comments
 (0)