From 3ae371a20866f8422b90dfbb30297d6b85d0fdce Mon Sep 17 00:00:00 2001 From: Shuai <100134295+shuaiplus@users.noreply.github.com> Date: Fri, 6 Jun 2025 21:51:40 +0800 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docker-image.yml 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 }}