diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2ef037e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Docker Build and Push on Release + +on: + release: + types: [published] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Log in to Docker Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io # replace with your registry if different + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}/httpd-proxy:${{ github.event.release.name }} # replace with your image name and tag