Merge branch 'patch/add-apps' into localApps
This commit is contained in:
67
apps/forgejo-runner/9.1.1/data.yml
Normal file
67
apps/forgejo-runner/9.1.1/data.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: http://1.2.3.4:3000
|
||||
edit: true
|
||||
envKey: FORGEJO_INSTANCE_URL
|
||||
labelEn: Forgejo Instance
|
||||
labelZh: Forgejo 实例
|
||||
required: true
|
||||
rule: paramExtUrl
|
||||
type: text
|
||||
label:
|
||||
en: Forgejo Instance
|
||||
ja: Forgejo インスタンス
|
||||
ms: Instans Forgejo
|
||||
pt-br: Instância Forgejo
|
||||
ru: Экземпляр Forgejo
|
||||
ko: Forgejo 인스턴스
|
||||
zh-Hant: Forgejo 實例
|
||||
zh: Forgejo 实例
|
||||
- default: '<registration_token>'
|
||||
edit: true
|
||||
envKey: RUNNER_REGISTRATION_TOKEN
|
||||
labelEn: Registration Token
|
||||
labelZh: Registration Token
|
||||
required: true
|
||||
type: text
|
||||
label:
|
||||
en: Registration Token
|
||||
ja: 登録トークン
|
||||
ms: Token Pendaftaran
|
||||
pt-br: Token de Registro
|
||||
ru: Токен регистрации
|
||||
ko: 등록 토큰
|
||||
zh-Hant: 註冊令牌
|
||||
zh: 注册令牌
|
||||
- default: '<runner_name>'
|
||||
edit: true
|
||||
envKey: RUNNER_NAME
|
||||
labelEn: Runner Name
|
||||
labelZh: Runner Name
|
||||
required: true
|
||||
type: text
|
||||
label:
|
||||
en: Runner Name
|
||||
ja: ランナー名
|
||||
ms: Nama Pelari
|
||||
pt-br: Nome do Runner
|
||||
ru: Имя бегуна
|
||||
ko: 러너 이름
|
||||
zh-Hant: 執行器名稱
|
||||
zh: 运行器名称
|
||||
- default: '<runner_labels>'
|
||||
edit: true
|
||||
envKey: RUNNER_LABELS
|
||||
labelEn: Runner Labels
|
||||
labelZh: Runner Labels
|
||||
required: true
|
||||
type: text
|
||||
label:
|
||||
en: Runner Labels
|
||||
ja: ランナータグ
|
||||
ms: Label Pelari
|
||||
pt-br: Rótulos do Runner
|
||||
ru: Метки бегуна
|
||||
ko: 러너 레이블
|
||||
zh-Hant: 執行器標籤
|
||||
zh: 运行器标签
|
||||
25
apps/forgejo-runner/9.1.1/docker-compose.yml
Normal file
25
apps/forgejo-runner/9.1.1/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
forgejo_runner:
|
||||
image: code.forgejo.org/forgejo/runner:9.1.1
|
||||
container_name: ${CONTAINER_NAME:-forgejo-runner}
|
||||
restart: always
|
||||
user: root
|
||||
command: "/data/scripts/register.sh"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./scripts/register.sh:/data/scripts/register.sh:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock # 使用宿主机 Docker
|
||||
environment:
|
||||
- DOCKER_HOST=unix:///var/run/docker.sock # 指定宿主机 socket
|
||||
- FORGEJO_INSTANCE_URL=${FORGEJO_INSTANCE_URL}
|
||||
- RUNNER_REGISTRATION_TOKEN=${RUNNER_REGISTRATION_TOKEN}
|
||||
- RUNNER_NAME=${RUNNER_NAME}
|
||||
- RUNNER_LABELS=${RUNNER_LABELS}
|
||||
networks:
|
||||
- 1panel-network
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
21
apps/forgejo-runner/9.1.1/scripts/init.sh
Normal file
21
apps/forgejo-runner/9.1.1/scripts/init.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# 创建数据目录并设置权限
|
||||
mkdir -p data
|
||||
touch data/.runner
|
||||
touch data/config.yml
|
||||
mkdir -p data/.cache
|
||||
|
||||
# 设置为 forgejo-runner 镜像中的默认非 root 用户
|
||||
chown -R 1000:1000 data
|
||||
chmod 775 data/.runner
|
||||
chmod 775 data/.cache
|
||||
chmod g+s data/.runner
|
||||
chmod g+s data/.cache
|
||||
|
||||
chmod +x ./scripts/register.sh
|
||||
|
||||
echo "✅ 初始化完成:"
|
||||
echo " - 已创建 ./data 并配置权限"
|
||||
echo " - 已创建 ./scripts/register.sh 并配置权限"
|
||||
17
apps/forgejo-runner/9.1.1/scripts/register.sh
Normal file
17
apps/forgejo-runner/9.1.1/scripts/register.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /data
|
||||
|
||||
if [ ! -s .runner ]; then
|
||||
echo ">>> Registering runner..."
|
||||
forgejo-runner register --no-interactive \
|
||||
--instance "$FORGEJO_INSTANCE_URL" \
|
||||
--token "$RUNNER_REGISTRATION_TOKEN" \
|
||||
--name "$RUNNER_NAME" \
|
||||
--labels "$RUNNER_LABELS"
|
||||
forgejo-runner generate-config > config.yml
|
||||
fi
|
||||
|
||||
echo ">>> Starting daemon..."
|
||||
exec forgejo-runner --config config.yml daemon
|
||||
66
apps/forgejo-runner/README.md
Normal file
66
apps/forgejo-runner/README.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Forgejo Actions Runner
|
||||
|
||||
**Forgejo Actions Runner** 是 Forgejo 的官方运行器组件,用于执行 CI/CD 工作流中的各类任务。它与 Forgejo Actions 系统集成,支持本地或远程运行任务,帮助用户构建自动化 DevOps 流程。
|
||||
|
||||
适合希望**完全自托管** CI/CD 流水线的个人或组织部署使用。
|
||||
|
||||
## ✨ 特性
|
||||
|
||||
- 与 Forgejo Actions 完全集成
|
||||
- 支持自定义容器或直接在主机运行
|
||||
- 多 Runner 支持并行执行
|
||||
- 支持 amd64 / arm64 等架构
|
||||
- 简单易用,部署轻量
|
||||
|
||||
## ⚙️ 快速开始(Docker 部署)
|
||||
|
||||
### 1. 启动 Forgejo 主服务(略)
|
||||
|
||||
确保 Forgejo 主程序已部署并启用了 Actions 功能。
|
||||
|
||||
### 2. 运行 Action Runner 容器
|
||||
|
||||
```bash
|
||||
docker run -d --name forgejo-runner \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /opt/runner:/data \
|
||||
codeberg.org/forgejo/runner:latest
|
||||
```
|
||||
|
||||
### 3. 初始化注册
|
||||
|
||||
首次运行后,进入容器进行注册:
|
||||
|
||||
```bash
|
||||
docker exec -it forgejo-runner forgejo-runner register
|
||||
```
|
||||
|
||||
你需要提供:
|
||||
|
||||
- **Forgejo 实例 URL**(例如 `https://git.example.com`)
|
||||
- **Runner Token**(从仓库或组织设置中获取)
|
||||
- **运行模式**(Docker / shell 等)
|
||||
- **标签**(可选,便于任务调度)
|
||||
|
||||
## 🔄 自动启动示例(Docker Compose)
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
forgejo-runner:
|
||||
image: codeberg.org/forgejo/runner:latest
|
||||
container_name: forgejo-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./runner-data:/data
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## 📘 文档与资源
|
||||
|
||||
- 项目主页:https://forgejo.org/docs/latest/admin/actions/
|
||||
- 源码仓库:https://code.forgejo.org/forgejo/runner
|
||||
|
||||
## 🧑🤝🧑 关于 Forgejo Runner
|
||||
|
||||
Forgejo Runner 是社区主导的 CI 执行器,致力于提供安全、可控、可扩展的构建环境。它是 Forgejo 构建完整 DevOps 生态的重要组成部分。
|
||||
31
apps/forgejo-runner/data.yml
Normal file
31
apps/forgejo-runner/data.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Forgejo Runner
|
||||
tags:
|
||||
- DevOps
|
||||
title: Forgejo Actions 的 Runner
|
||||
description: Forgejo Actions 的 Runner
|
||||
additionalProperties:
|
||||
key: forgejo-runner
|
||||
name: Forgejo Runner
|
||||
tags:
|
||||
- DevOps
|
||||
shortDescZh: Forgejo Actions 的 Runner
|
||||
shortDescEn: A runner for Forgejo based on Forgejo fork of act
|
||||
description:
|
||||
en: A runner for Forgejo based on Forgejo fork of act
|
||||
ja: act の Forgejo フォークに基づいた Forgejo 用ランナー
|
||||
ms: Penjalank untuk Forgejo berdasarkan fork Forgejo dari act
|
||||
pt-br: Um runner para Forgejo baseado no fork do Forgejo do act
|
||||
ru: Раннер для Forgejo на основе форка Forgejo от act
|
||||
ko: act의 Forgejo 포크를 기반으로 한 Forgejo용 러너
|
||||
zh-Hant: 基於 Forgejo fork 的 act 的 Forgejo 執行器
|
||||
zh: 基于 Forgejo fork 的 act 的 Forgejo 运行器
|
||||
type: tool
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
recommend: 0
|
||||
website: https://forgejo.org/docs/latest/admin/actions/
|
||||
github: https://code.forgejo.org/forgejo/runner
|
||||
document: https://forgejo.org/docs/latest/admin/actions/
|
||||
architectures:
|
||||
- amd64
|
||||
- arm64
|
||||
BIN
apps/forgejo-runner/logo.png
Normal file
BIN
apps/forgejo-runner/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
Reference in New Issue
Block a user