mirror of
https://github.com/outbackdingo/openwrt-passwall-packages.git
synced 2026-01-27 10:19:59 +00:00
ci: optimize code (#533)
Removed peter-evans/create-pull-request and replaced it with GH for submitting PRs. Fixed the error issue when creating PRs with peter-evans/create-pull-request.
This commit is contained in:
47
.github/workflows/Auto update packages v2.yml
vendored
47
.github/workflows/Auto update packages v2.yml
vendored
@@ -344,20 +344,35 @@ jobs:
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
if: steps.check.outputs.status == 'success' && steps.check.outputs.New_PKG_VERSION != '' && steps.update.outputs.branch_exists == '' && !cancelled()
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
|
||||
committer: smallprogram <smallprogram@foxmail.com>
|
||||
author: smallprogram <smallprogram@foxmail.com>
|
||||
signoff: false
|
||||
branch: patches-${{ matrix.pakcages }}-${{ steps.update.outputs.version }}
|
||||
base: main
|
||||
delete-branch: true
|
||||
body: |
|
||||
${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}
|
||||
title: "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
|
||||
labels: |
|
||||
automated-pr
|
||||
draft: false
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
branch="patches-${{ matrix.pakcages }}-${{ steps.update.outputs.version }}"
|
||||
title="${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
|
||||
EXISTING=$(gh pr list \
|
||||
--state open \
|
||||
--base main \
|
||||
--json number,title \
|
||||
--jq ".[] | select(.title == \"$title\") | .number" \
|
||||
|| echo "")
|
||||
|
||||
if [ -n "$EXISTING" ]; then
|
||||
echo "Duplicate PR with title '$TITLE' already exists: #$EXISTING"
|
||||
else
|
||||
git config --global user.email "smallprogram@foxmail.com"
|
||||
git config --global user.name "smallprogram"
|
||||
|
||||
|
||||
echo "No duplicate found, will create PR."
|
||||
git checkout -b "$branch"
|
||||
git add .
|
||||
git commit -m "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
|
||||
git push origin $branch
|
||||
|
||||
gh pr create \
|
||||
--title "$title" \
|
||||
--body "$title" \
|
||||
--base main \
|
||||
--head "$branch" \
|
||||
--label "automated-pr"
|
||||
fi
|
||||
|
||||
@@ -12,22 +12,22 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202510090019
|
||||
GEOIP_VER:=202511130021
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/Loyalsoldier/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=7221ec729adb6b369380e34d7b4396159d0c84ef1d3653fcadbc404ffe0939bc
|
||||
HASH:=5523598ceff1c7eecfa2150f8bcd9294b010dac1d855d0cb90ca120aab9c2435
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=202510132212
|
||||
GEOSITE_VER:=202511142213
|
||||
GEOSITE_FILE:=geosite.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=geosite.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=e9b58a19d3966f14ef694fbe870cbe3a26de0bd900acdfc3926523ba881fe858
|
||||
HASH:=2c40a5d0ce9850f7696e295f7fe2e5faa2fa07f8813275102d889eb8515728dd
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
|
||||
Reference in New Issue
Block a user