diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d40a769 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Deploy Server +on: + push: + branches: [release] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Log in to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: ghcr.io/wind-explorer/friendolls-server:latest + + - name: Trigger homelab deploy + run: | + curl -X POST https://wh.adamcv.com/hooks/friendolls-server-redeploy \ + -H "Authorization: Bearer ${{ secrets.DEPLOY_WEBHOOK_SECRET }}"