mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
Update update-dependencies.yml
This commit is contained in:
parent
a465ccd1f8
commit
f9ac2715af
1 changed files with 17 additions and 9 deletions
26
.github/workflows/update-dependencies.yml
vendored
26
.github/workflows/update-dependencies.yml
vendored
|
@ -31,11 +31,20 @@ jobs:
|
||||||
- name: Fetch latest Xray-core release
|
- name: Fetch latest Xray-core release
|
||||||
id: get_latest_release
|
id: get_latest_release
|
||||||
run: |
|
run: |
|
||||||
LATEST_TAG=$(curl -s https://api.github.com/repos/XTLS/Xray-core/releases/latest | jq -r .tag_name)
|
# Получаем JSON с информацией о последнем релизе
|
||||||
CLEAN_TAG=${LATEST_TAG#v} # Убираем 'v' в начале
|
API_RESPONSE=$(curl -s https://api.github.com/repos/XTLS/Xray-core/releases/latest)
|
||||||
echo "Latest Xray-core release: $LATEST_TAG (cleaned: $CLEAN_TAG)"
|
|
||||||
|
# Извлекаем тег версии (например, v25.2.21)
|
||||||
|
LATEST_TAG=$(echo "$API_RESPONSE" | jq -r .tag_name)
|
||||||
|
|
||||||
|
# Получаем хеш коммита, связанный с этим релизом
|
||||||
|
COMMIT_HASH=$(echo "$API_RESPONSE" | jq -r .target_commitish)
|
||||||
|
|
||||||
|
echo "Latest Xray-core release: $LATEST_TAG (commit: $COMMIT_HASH)"
|
||||||
|
|
||||||
|
# Записываем в переменные среды
|
||||||
echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV
|
echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV
|
||||||
echo "clean_tag=$CLEAN_TAG" >> $GITHUB_ENV
|
echo "commit_hash=$COMMIT_HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Check go.mod and go.sum exist
|
- name: Check go.mod and go.sum exist
|
||||||
run: |
|
run: |
|
||||||
|
@ -59,23 +68,22 @@ jobs:
|
||||||
id: update
|
id: update
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail # Строгий режим для bash
|
set -euo pipefail # Строгий режим для bash
|
||||||
|
|
||||||
echo "Updating standard Go dependencies..."
|
echo "Updating standard Go dependencies..."
|
||||||
|
|
||||||
go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all | \
|
go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all | \
|
||||||
grep -v 'gvisor.dev/gvisor' | \
|
grep -v 'gvisor.dev/gvisor' | \
|
||||||
grep -v 'github.com/xtls/xray-core' | \
|
grep -v 'github.com/xtls/xray-core' | \
|
||||||
xargs -r go get -u
|
xargs -r go get -u
|
||||||
|
|
||||||
echo "Updating xray-core to latest release: ${{ env.clean_tag }}"
|
echo "Updating xray-core to commit: ${{ env.commit_hash }}"
|
||||||
go get github.com/xtls/xray-core@${{ env.clean_tag }}
|
go get github.com/xtls/xray-core@${{ env.commit_hash }}
|
||||||
|
|
||||||
echo "Updated xray-core to:"
|
echo "Updated xray-core to:"
|
||||||
go list -m github.com/xtls/xray-core
|
go list -m github.com/xtls/xray-core
|
||||||
|
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go mod verify || exit 1
|
go mod verify || exit 1
|
||||||
|
|
||||||
echo "Updated dependencies:"
|
echo "Updated dependencies:"
|
||||||
go list -m all
|
go list -m all
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue