diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..5e2f574 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -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 }}