Gitea Actions
A release.yml under .gitea/workflows that releases every push to main to production with the HotCodePush release action, with the bare CLI line beside it.
To ship every commit from Gitea Actions, a workflow on push to main builds the app and runs the release action with two repository secrets. The file is GitHub's workflow syntax under .gitea/workflows/.
Ship every commit has the prerequisites and the three disciplines. This page carries the Gitea Actions file.
Secrets to set
Both live under the repository's Settings › Actions › Secrets, or the organization's for every repository it owns. Gitea ignores a job's environment: key, so a secret has no environment scope.
| Secret | Holds |
|---|---|
HOTCODEPUSH_TOKEN | Holds an API token from the console's API tokens page. |
HOTCODEPUSH_SIGNING_KEY | Holds the content of the private key file signing-key create wrote, PEM lines included. Leave it out until the app has a key. |
A pull request from a fork gets no secrets but GITEA_TOKEN, and a first-time contributor's run waits for a maintainer's approval. In a pull request job that releases, such as the preview workflow, guard the job with if: gitea.event.pull_request.head.repo.full_name == gitea.repository when the repository takes outside contributions.
The workflow
name: Release to production
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the commit
uses: actions/checkout@v7
- name: Build the web app
run: npm ci && npm run build
- name: Release to production
uses: hotcodepush-team/release-action@v0.1.0
with:
token: ${{ secrets.HOTCODEPUSH_TOKEN }}
private-key: ${{ secrets.HOTCODEPUSH_SIGNING_KEY }}
channel: productionThe GitHub Actions recipe lists the inputs a pipeline reaches for. The action's README lists them all.
- A React Native or Expo app replaces the build step with
npm cialone: the CLI packages the bundle per platform inside the upload. A Cordova app whosewwwis written by hand has no build step either. - The runner's Node.js must be 22 or later. The default runner image,
docker.gitea.com/runner-images:ubuntu-latest, ships 24. On a runner registered with another image, give the jobcontainer: node:22. uses:without a host downloads from github.com, unless the instance'sDEFAULT_ACTIONS_URLisself. There, name the host:uses: https://github.com/hotcodepush-team/release-action@v0.1.0.
The release step logs one line per release and writes a job summary. Gitea 1.27 and later with Gitea Runner 2.0 and later shows it on the run's Summary view, and older versions show none.
A failed release fails the step with the CLI's exit code. Gitea shows no annotation: the code and its message are in the step's log, and the error catalog names the fix. A green job and a device that did not take the release is the other case. See Troubleshooting.
A preview channel per pull request runs from a second workflow on pull_request. Its QR code comment is an API call with the job's own GITEA_TOKEN, and under the restricted token mode the job declares permissions: pull-requests: write. Test with preview channels has the commands.
Next steps
- Ship every commit names the three disciplines a pipeline that ships every commit keeps.
- Test with preview channels has the preview workflow and the tester build that follows a channel.
- Roll out gradually sets
rollout-percentandprogressionon the action and explains the auto-pause counters.
Last updated on