Migrate CI/CD from Gitea Actions to Drone
Replace .gitea/workflows/docker.yml with .drone.yml using the Drone Docker plugin with auto_tag enabled. On Git tag pushes (v0.2.0), Drone automatically creates Docker image tags: full version (0.2.0), minor version (0.2), and latest. Updated docs/DEVELOPMENT.md to document Drone CI/CD setup instead of Gitea Actions. Updated CHANGELOG.md to reflect the Drone migration. Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
+24
-19
@@ -95,7 +95,7 @@ docker run -d \
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Gitea Actions runner must be configured and running.
|
||||
- Drone CI/CD runner must be configured and running.
|
||||
- Gitea Container Registry must be enabled on the server.
|
||||
- Repository secrets `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` must be set in the Gitea repository.
|
||||
|
||||
@@ -134,6 +134,26 @@ 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.
|
||||
|
||||
### Configuring Drone CI/CD
|
||||
|
||||
The repository uses **Drone** for CI/CD. The configuration file `.drone.yml` is already included in the repository.
|
||||
|
||||
**1. Enable Drone for the repository.**
|
||||
|
||||
In Gitea, open the repository and go to **Settings → Drone**. Enable Drone CI/CD for the repository.
|
||||
|
||||
**2. Configure Drone secrets.**
|
||||
|
||||
In Gitea, open the repository and go to **Settings → Secrets** (or **Variables and Secrets → Secrets**). Add two secrets:
|
||||
|
||||
**First secret:**
|
||||
- **Name:** `REGISTRY_USERNAME`
|
||||
- **Value:** `Liosha84` (your Gitea username)
|
||||
|
||||
**Second secret:**
|
||||
- **Name:** `REGISTRY_PASSWORD`
|
||||
- **Value:** paste the Access Token with `write:package` and `read:package` scopes.
|
||||
|
||||
### 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:
|
||||
@@ -150,21 +170,6 @@ The CI/CD workflow cannot use your account password. You need a Personal Access
|
||||
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
|
||||
|
||||
1. **Update `CHANGELOG.md`** with changes for the new version.
|
||||
@@ -184,10 +189,10 @@ The CI/CD workflow cannot use your account password. You need a Personal Access
|
||||
git push origin v0.2.0
|
||||
```
|
||||
|
||||
4. **Gitea Actions** will automatically:
|
||||
4. **Drone** will automatically:
|
||||
- Build the Docker image using the multi-stage Dockerfile
|
||||
- Tag it with the version (`0.2.0`), minor version (`0.2`), and `latest`
|
||||
- Push all three tags to the Gitea Container Registry
|
||||
- Auto-tag it using Semantic Versioning: `v0.2.0` produces tags `0.2`, `0.2.0`
|
||||
- Push all tags to the Gitea Container Registry
|
||||
|
||||
### Docker image tags
|
||||
|
||||
|
||||
Reference in New Issue
Block a user