mirror of
https://github.com/arch3rPro/1Panel-Appstore.git
synced 2026-04-15 00:17:12 +08:00
Remake Repository
This commit is contained in:
28
.github/workflows/llm-code-review.yml
vendored
Normal file
28
.github/workflows/llm-code-review.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: LLM Code Review
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
llm-code-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: fit2cloud/LLM-CodeReview-Action@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.FIT2CLOUDRD_LLM_CODE_REVIEW_TOKEN }}
|
||||
OPENAI_API_KEY: ${{ secrets.ALIYUN_LLM_API_KEY }}
|
||||
LANGUAGE: English
|
||||
OPENAI_API_ENDPOINT: https://dashscope.aliyuncs.com/compatible-mode/v1
|
||||
MODEL: qwen2.5-coder-3b-instruct
|
||||
PROMPT: "Please check the following code differences for any irregularities, potential issues, or optimization suggestions, and provide your answers in English."
|
||||
top_p: 1
|
||||
temperature: 1
|
||||
# max_tokens: 10000
|
||||
MAX_PATCH_LENGTH: 10000
|
||||
IGNORE_PATTERNS: "/node_modules,*.md,/dist,/.github"
|
||||
FILE_PATTERNS: "*.java,*.go,*.py,*.vue,*.ts,*.js,*.css,*.scss,*.html,*.yml,*.yaml"
|
||||
26
.github/workflows/renovate-app-version.sh
vendored
Normal file
26
.github/workflows/renovate-app-version.sh
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# This script copies the version from docker-compose.yml to config.json.
|
||||
|
||||
app_name=$1
|
||||
old_version=$2
|
||||
|
||||
# find all docker-compose files under apps/$app_name (there should be only one)
|
||||
docker_compose_files=$(find apps/$app_name/$old_version -name docker-compose.yml)
|
||||
|
||||
for docker_compose_file in $docker_compose_files
|
||||
do
|
||||
# Assuming that the app version will be from the first docker image
|
||||
first_service=$(yq '.services | keys | .[0]' $docker_compose_file)
|
||||
|
||||
image=$(yq .services.$first_service.image $docker_compose_file)
|
||||
|
||||
# Only apply changes if the format is <image>:<version>
|
||||
if [[ "$image" == *":"* ]]; then
|
||||
version=$(cut -d ":" -f2- <<< "$image")
|
||||
|
||||
# Trim the "v" prefix
|
||||
trimmed_version=${version/#"v"}
|
||||
|
||||
mv apps/$app_name/$old_version apps/$app_name/$trimmed_version
|
||||
fi
|
||||
done
|
||||
53
.github/workflows/renovate-app-version.yml
vendored
Normal file
53
.github/workflows/renovate-app-version.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Update app version in Renovate Branches
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'renovate/*' ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
manual-trigger:
|
||||
description: 'Manually trigger Renovate'
|
||||
default: ''
|
||||
jobs:
|
||||
update-app-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure repo
|
||||
run: |
|
||||
git config --local user.email "githubaction@githubaction.com"
|
||||
git config --local user.name "github-action update-app-version"
|
||||
|
||||
- name: Get list of updated files by the last commit in this branch separated by space
|
||||
id: updated-files
|
||||
run: |
|
||||
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | tr '\n' ' ')"
|
||||
|
||||
- name: Run renovate-app-version.sh on updated files
|
||||
run: |
|
||||
IFS=' ' read -ra files <<< "${{ steps.updated-files.outputs.files }}"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||
app_name=$(echo $file | cut -d'/' -f 2)
|
||||
old_version=$(echo $file | cut -d'/' -f 3)
|
||||
chmod +x .github/workflows/renovate-app-version.sh
|
||||
.github/workflows/renovate-app-version.sh $app_name $old_version
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit & Push Changes
|
||||
run: |
|
||||
IFS=' ' read -ra files <<< "${{ steps.updated-files.outputs.files }}"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||
app_name=$(echo $file | cut -d'/' -f 2)
|
||||
git add "apps/$app_name/*" && git commit -m "Update app version [skip ci]" --no-verify && git push || true
|
||||
fi
|
||||
done
|
||||
|
||||
22
.github/workflows/renovate.yml
vendored
Normal file
22
.github/workflows/renovate.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Renovate
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
manual-trigger:
|
||||
description: 'Manually trigger Renovate'
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Run Renovate
|
||||
uses: renovatebot/github-action@d385c88822a237acaead89c462fa0aef7502748f # v41.0.11
|
||||
with:
|
||||
useSlim: false
|
||||
token: ${{ secrets.GITHUBTOKEN }}
|
||||
Reference in New Issue
Block a user