Create docker-image.yml
This commit is contained in:
1 parent
feca67635c
commit
3ae371a208
1 file changed
+26
@@ -0,0 +1,26 @@
|
||||
name: Docker Build and Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'shuaiplus/nodecrypt'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/shuaiplus/nodecrypt:latest
|
||||
ghcr.io/shuaiplus/nodecrypt:${{ github.sha }}
|
||||
Reference in new issue
Block a user