Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee263d6224 | ||
|
|
cb1c8b9a2c |
@@ -21,13 +21,15 @@ jobs:
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: |
|
||||
# Remove 'v' prefix from tag (e.g., v0.1.0 → 0.1.0)
|
||||
# Remove 'refs/tags/v' prefix from tag (e.g., refs/tags/v0.1.0 → 0.1.0)
|
||||
VERSION=$(echo "${{ gitea.ref }}" | sed 's|refs/tags/v||')
|
||||
echo "version=${VERSION}" >> "${GITEA_OUTPUT}"
|
||||
echo "Extracted version: ${VERSION}"
|
||||
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
# Extract major.minor for minor tag (e.g., 0.1.0 → 0.1)
|
||||
MINOR=$(echo "${VERSION}" | sed 's/\.[0-9]*$//')
|
||||
echo "minor=${MINOR}" >> "${GITEA_OUTPUT}"
|
||||
echo "Extracted minor: ${MINOR}"
|
||||
echo "minor=${MINOR}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
Generated
-7
@@ -1,12 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel>
|
||||
<module name="backend" target="21" />
|
||||
<module name="backend.main" target="21" />
|
||||
<module name="backend.test" target="21" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="backend" options="-parameters" />
|
||||
|
||||
+68
-1
@@ -96,7 +96,74 @@ docker run -d \
|
||||
### Prerequisites
|
||||
|
||||
- Gitea Actions runner must be configured and running.
|
||||
- Repository secrets `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` must be set in **Settings → Secrets** of the Gitea repository. These credentials are used to authenticate with the Gitea Container Registry.
|
||||
- Gitea Container Registry must be enabled on the server.
|
||||
- Repository secrets `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` must be set in the Gitea repository.
|
||||
|
||||
### Enabling Container Registry on Gitea server
|
||||
|
||||
Container Registry is a built-in feature of Gitea 1.17+. It is **not** configured through the web admin panel — it is enabled via the `app.ini` configuration file on the server.
|
||||
|
||||
**1. Find `app.ini` on your server.** The location depends on your installation method:
|
||||
|
||||
| Installation | Path to `app.ini` |
|
||||
|--------------|-------------------|
|
||||
| Docker (official image) | `/data/gitea/conf/app.ini` inside the container |
|
||||
| System package (APT/YUM) | `/etc/gitea/app.ini` |
|
||||
| Manual binary install | `<working-dir>/custom/conf/app.ini` |
|
||||
|
||||
You can also find the path from Gitea web interface: **Site Administration → Configuration Summary** — look for `CustomConf` value.
|
||||
|
||||
**2. Edit `app.ini`** and add the `[packages]` section:
|
||||
|
||||
```ini
|
||||
[packages]
|
||||
ENABLED = true
|
||||
```
|
||||
|
||||
If the `[packages]` section already exists, make sure `ENABLED = true`.
|
||||
|
||||
**3. Restart Gitea** to apply the changes:
|
||||
|
||||
```bash
|
||||
# Docker
|
||||
docker compose restart gitea
|
||||
|
||||
# System service
|
||||
sudo systemctl restart gitea
|
||||
```
|
||||
|
||||
**4. Verify** that the registry is working by visiting `https://gitea.jambotron.com/user/packages` — you should see a "Packages" tab.
|
||||
|
||||
### Creating an Access Token for CI/CD
|
||||
|
||||
The CI/CD workflow cannot use your account password. You need a Personal Access Token with package permissions:
|
||||
|
||||
1. Log in to Gitea as `Liosha84`.
|
||||
2. Go to **Settings** (your avatar → Settings).
|
||||
3. In the left menu: **Applications → Manage Access Tokens**.
|
||||
4. You'll see the section: *"These tokens grant access to your account using the Gitea API."*
|
||||
5. Click **Generate token**.
|
||||
6. Fill in:
|
||||
- **Token name:** `ci-docker-push`
|
||||
- **Expiration:** select **No expiration** (or set a date, but you'll need to update the secret later).
|
||||
- **Scopes:** check **`write:package`** and **`read:package`**.
|
||||
7. Click **Generate**.
|
||||
8. **Copy the token** — it will be shown only once! Save it securely.
|
||||
|
||||
### Configuring repository secrets
|
||||
|
||||
1. Open the repository: `https://gitea.jambotron.com/Liosha84/htop-web`.
|
||||
2. Go to **Settings** (tab at the top).
|
||||
3. In the left menu: **Secrets** (or **Variables and Secrets → Secrets**).
|
||||
4. Click **Add secret**.
|
||||
|
||||
**First secret:**
|
||||
- **Name:** `REGISTRY_USERNAME`
|
||||
- **Value:** `Liosha84` (your Gitea username)
|
||||
|
||||
**Second secret:**
|
||||
- **Name:** `REGISTRY_PASSWORD`
|
||||
- **Value:** paste the Access Token you created in the previous step.
|
||||
|
||||
### Creating a release
|
||||
|
||||
|
||||
Reference in New Issue
Block a user