27 lines
683 B
YAML
27 lines
683 B
YAML
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 }}
|