Host the action on Gitea
Some checks failed
test / test (20) (push) Successful in 1m55s
test / test (22) (push) Successful in 1m3s
test / misconfiguration (push) Successful in 16s
release / major-tag (push) Failing after 15m44s

Workflows move to .gitea/workflows, which Gitea prefers over
.github/workflows when both exist.

GitHub Actions can only resolve `uses:` against github.com, so the
README now spells out both forms: the full Gitea URL, and the
checkout-then-`uses: ./` fallback for a GitHub workflow that has no
mirror of this repository.
This commit is contained in:
2026-08-09 12:37:09 +03:00
parent c23b44983b
commit c4a7cabcef
6 changed files with 48 additions and 22 deletions

View File

@@ -9,7 +9,7 @@ can sit behind your linters and tests, deploy the exact image you just built,
and fail the run when the deployment fails.
```yaml
- uses: maxvojtkov/dokploy-deploy-action@v1
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
with:
host: ${{ secrets.DOKPLOY_HOST }}
api-key: ${{ secrets.DOKPLOY_API_KEY }}
@@ -22,7 +22,7 @@ and fail the run when the deployment fails.
- [Why not the built-in webhook?](#why-not-the-built-in-webhook)
- [Quick start](#quick-start)
- [Gitea](#gitea)
- [Referencing the action](#referencing-the-action)
- [Choosing the service](#choosing-the-service)
- [Deploying a new image](#deploying-a-new-image)
- [Compose stacks](#compose-stacks)
@@ -67,7 +67,7 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: maxvojtkov/dokploy-deploy-action@v1
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
with:
host: ${{ secrets.DOKPLOY_HOST }}
api-key: ${{ secrets.DOKPLOY_API_KEY }}
@@ -91,26 +91,46 @@ Worked examples, from lint through image build to deploy:
- [`examples/manual-promote.yml`](examples/manual-promote.yml) — promote or roll
back an existing tag from the Actions tab.
## Gitea
## Referencing the action
Nothing changes. The action is plain JavaScript with no dependencies and no
bundled `dist/`, so Gitea's `act_runner` executes it straight from the
repository, and Gitea sets the same `GITHUB_*` variables the defaults are built
from.
The action is plain JavaScript with no dependencies and no bundled `dist/`, so
a runner executes it straight from this repository — nothing to build, nothing
to vendor. It also reads only `GITHUB_*` variables, which Gitea sets exactly as
GitHub does, so the same step works on either.
How you reference it depends on your instance's `DEFAULT_ACTIONS_URL`. If it is
the default (`https://github.com`), the short form works:
**From Gitea** — the full URL always works, whatever your instance's
`DEFAULT_ACTIONS_URL` is set to:
```yaml
- uses: maxvojtkov/dokploy-deploy-action@v1
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
```
Otherwise give the full URL, or mirror this repository into your instance:
If your instance sets `DEFAULT_ACTIONS_URL = self`, the short form works too:
```yaml
- uses: https://github.com/maxvojtkov/dokploy-deploy-action@v1
- uses: usr_unknown/dokploy-deploy-action@v1
```
**From GitHub** — GitHub Actions can only resolve `uses:` against github.com;
it will not fetch an action from another host. So a GitHub workflow needs
either a mirror of this repository on github.com, or a local checkout:
```yaml
- uses: actions/checkout@v4
with:
repository: your-org/dokploy-deploy-action
ref: v1
path: .actions/dokploy-deploy
- uses: ./.actions/dokploy-deploy
with:
project: shop
service: api
```
[`examples/github-build-and-deploy.yml`](examples/github-build-and-deploy.yml)
is written in the short form, on the assumption that you have mirrored this
repository to github.com.
## Choosing the service
Either name the service, or give an id.
@@ -142,7 +162,7 @@ whole reason to run a deployment from CI: the image that gets deployed is the
one your tests just passed against.
```yaml
- uses: maxvojtkov/dokploy-deploy-action@v1
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
with:
project: shop
service: api
@@ -172,7 +192,7 @@ Same thing, with `compose-id` or a `service` that names a stack. Images come
from the Compose file, so `docker-image` does not apply:
```yaml
- uses: maxvojtkov/dokploy-deploy-action@v1
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
with:
project: shop
service: worker
@@ -316,9 +336,9 @@ workflows pin.
Same Dokploy API, different jobs:
- [terraform-provider-dokploy](https://github.com/maxvojtkov/terraform-provider-dokploy)
- [terraform-provider-dokploy](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy)
— declare projects, applications, databases and domains.
- [pulumi-dokploy](https://github.com/maxvojtkov/pulumi-dokploy) — the same, in
- [pulumi-dokploy](https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy) — the same, in
TypeScript, Python, Go or .NET.
The usual division of labour: the provider creates the service and owns its