diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1331bdf..3479278 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,4 +58,20 @@ jobs: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} run: | curl https://cli-assets.heroku.com/install.sh | sh - /usr/local/bin/heroku container:release web --app ${{ secrets.HEROKU_APP_NAME }} \ No newline at end of file + /usr/local/bin/heroku container:release web --app ${{ secrets.HEROKU_APP_NAME }} + + - name: Deploy on Dokploy + env: + DOKPLOY_API_KEY: ${{ secrets.DOKPLOY_API_KEY }} + DOKPLOY_API_URL: ${{ secrets.DOKPLOY_API_URL }} + DOKPLOY_APP_ID: ${{ secrets.DOKPLOY_APP_ID }} + run: | + curl -f -X POST "${DOKPLOY_API_URL}/api/application.deploy" \ + -H 'accept: application/json' \ + -H "x-api-key: ${DOKPLOY_API_KEY}" \ + -H 'Content-Type: application/json' \ + -d "{ + \"applicationId\": \"${DOKPLOY_APP_ID}\", + \"title\": \"Release ${GITHUB_REF_NAME}\", + \"description\": \"GoReleaser tag ${GITHUB_REF_NAME}\" + }" diff --git a/AGENTS.md b/AGENTS.md index 217a7ee..fcb2e47 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,7 +49,15 @@ make clean # Remove dist/ and generated docs ## CI/CD - **cover.yml**: runs `make build` and `make test`, pushes coverage to Coveralls -- **release.yml**: triggered on tags, runs goreleaser for multi‑arch binaries and Docker images +- **release.yml**: triggered on tags, runs goreleaser for multi‑arch binaries and Docker images, then releases to Heroku and Dokploy + +Release workflow secrets: + +| Secret | Used for | +| --- | --- | +| `HEROKU_EMAIL`, `HEROKU_API_KEY`, `HEROKU_APP_NAME` | Heroku Container Registry push and `container:release` | +| `DOCKER_USERNAME`, `DOCKER_TOKEN` | Docker Hub image publish | +| `DOKPLOY_API_URL`, `DOKPLOY_API_KEY`, `DOKPLOY_APP_ID` | Dokploy deploy after image publish (`pgconfig/api:latest`) | ## Commit Conventions