change runner for forgejo
This commit is contained in:
parent
7c5493b31f
commit
891fb04f5a
2 changed files with 25 additions and 7 deletions
|
|
@ -11,7 +11,7 @@ The `.forgejo/workflows/build-deploy.yml` file replaces `.gitlab-ci.yml` with eq
|
|||
| GitLab CI | Forgejo Actions |
|
||||
|-----------|-----------------|
|
||||
| `stages:` | `jobs:` (jobs run in dependency order) |
|
||||
| `tags: [home]` | `runs-on: self-hosted` |
|
||||
| `tags: [home]` | `runs-on: ubuntu-latest` |
|
||||
| `rules:` | `on:` (trigger conditions) |
|
||||
| `$CI_COMMIT_SHA` | `${{ github.sha }}` |
|
||||
| `$CI_REGISTRY_IMAGE` | `${{ secrets.REGISTRY_URL }}/${{ github.repository }}` |
|
||||
|
|
@ -28,7 +28,23 @@ Configure these in your Forgejo repository settings (Settings → Secrets):
|
|||
|
||||
### Required Runner Setup
|
||||
|
||||
The workflow assumes a self-hosted runner that has:
|
||||
The workflow uses `ubuntu-latest` as the target label, which should match most Linux-based runners.
|
||||
|
||||
**To check your runner's labels:**
|
||||
1. Go to your Forgejo repository → Settings → Actions → Runners
|
||||
2. Look for the "Labels" column for your registered runner
|
||||
3. If you see `ubuntu-latest` or `ubuntu-22.04`, the workflow should work
|
||||
|
||||
**To register a runner with specific labels:**
|
||||
```bash
|
||||
# Register with custom labels
|
||||
./act_runner register --labels ubuntu-latest,custom-label
|
||||
|
||||
# Or edit the runner config after registration
|
||||
# Edit .runner file or config.yaml and add labels
|
||||
```
|
||||
|
||||
The runner must have:
|
||||
|
||||
1. **Docker** - For building images
|
||||
2. **kubectl** - Pre-configured with cluster access
|
||||
|
|
@ -91,6 +107,8 @@ act push -W .forgejo/workflows/build-deploy.yml -j build
|
|||
- Verify cluster access: `kubectl get deployments -n towerops`
|
||||
|
||||
**Runner not picking up jobs:**
|
||||
- Verify runner is registered as self-hosted
|
||||
- Check runner logs in Forgejo Actions settings
|
||||
- Ensure runner is online and connected
|
||||
- Check runner labels: Repository → Settings → Actions → Runners
|
||||
- Verify runner has `ubuntu-latest` label (or update workflow to match your runner's labels)
|
||||
- Check runner logs: `journalctl -u act_runner -f` or check runner process output
|
||||
- Ensure runner is online and connected (green status in UI)
|
||||
- If runner has different labels, update `runs-on:` in workflow to match
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -52,7 +52,7 @@ jobs:
|
|||
BUILDKIT_INLINE_CACHE=1
|
||||
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: production
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue