diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml new file mode 100644 index 0000000..1fdcba1 --- /dev/null +++ b/.github/workflows/build-and-push.yml @@ -0,0 +1,26 @@ +name: Docker Image CI +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Log in to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push image + uses: docker/build-push-action@v3 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ghcr.io/${{ github.repository }}/privasea-acceleration-node-beta:latest + ghcr.io/${{ github.repository }}/privasea-acceleration-node-beta:${{ github.sha }}