Compare commits

..

3 Commits

Author SHA1 Message Date
fa-sharp
da2129344d Update dependency-check.yml 2026-02-20 03:07:12 -05:00
fa-sharp
19b1952d14 Update dependency-check.yml 2026-02-20 03:03:02 -05:00
fa-sharp
673a53c34b ci: use own pr logic 2026-02-20 02:55:14 -05:00

View File

@@ -8,6 +8,7 @@ on:
env:
RUST_VERSION: "1.90"
TEA_VERSION: "0.9.2"
jobs:
check-dependencies:
@@ -97,6 +98,8 @@ jobs:
git diff Cargo.toml.liquid
git checkout -b deps/auto-upgrade-${{ github.run_number }}
git add Cargo.toml.liquid
git config user.email "bot@gitea.actions"
git config user.name "Dependency Bot"
git commit -m "chore: upgrade dependencies"
working-directory: ${{ github.workspace }}
@@ -190,22 +193,69 @@ jobs:
cat pr-body.txt
working-directory: ${{ github.workspace }}
- name: Install Tea
if: steps.upgrade.outputs.has_updates == 'true'
env:
TEA_DL_ARCH: '${{ fromJson(''{ "x86": "386", "x64": "amd64", "ARM": "arm", "ARM64": "arm64" }'')[ runner.arch ] }}'
TEA_DL_URL: "https://dl.gitea.com/tea/${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-"
shell: bash
run: |
if ! command -v tea >/dev/null 2>&1; then
TEA_DIR=$(mktemp -d -t tmp.XXXX)
pushd $TEA_DIR
wget -q -nc "${TEA_DL_URL}${TEA_DL_ARCH}"
wget -q -nc "${TEA_DL_URL}${TEA_DL_ARCH}.sha256"
if $(sha256sum --quiet -c "tea-${{ env.TEA_VERSION }}-linux-${TEA_DL_ARCH}.sha256"); then
sudo mv "tea-${{ env.TEA_VERSION }}-linux-${TEA_DL_ARCH}" /usr/bin/tea
sudo chmod +x /usr/bin/tea
sudo cp -rf /usr/bin/tea $RUNNER_TOOL_CACHE/bin
popd
rm -rf $TEA_DIR
else
popd
rm -rf $TEA_DIR
echo "::error title=⛔ error hint::Tea v${{ env.TEA_VERSION }} Checksum Failed"
exit 1
fi
else
echo "Tea CLI already installed"
fi
- name: Login to Gitea
if: steps.upgrade.outputs.has_updates == 'true'
shell: bash
run: >-
tea login add
-u "${{ github.server_url }}"
-t "${{ secrets.GITHUB_TOKEN }}"
- name: Create Pull Request with dependency updates
if: steps.upgrade.outputs.has_updates == 'true'
uses: infinilabs/gitea-pr@v0
permissions:
contents: write
with:
url: ${{ github.server_url }}
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: upgrade dependencies"
committer: "Dependency Bot <bot@github.actions>"
author: "Dependency Bot <bot@github.actions>"
base: ${{ github.ref_name }}
branch: ${{ github.actor }}:deps/auto-upgrade-${{ github.run_number }}
title: "⬆️ Automated Dependency Upgrade"
body-path: ${{ github.workspace }}/pr-body.txt
pr-label: "deps/bot"
working-directory: ${{ github.workspace }}
run: |
# Read the PR body from file
PR_BODY=$(cat pr-body.txt)
# Configure git authentication
git config user.name "Dependency Bot"
git config user.email "bot@gitea.actions"
# Set up authenticated remote URL
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@${{ github.server_url }}/${{ github.repository }}"
# Commit and push changes
git checkout -b "deps/auto-upgrade-${{ github.run_number }}"
git add Cargo.toml.liquid
git commit -m "chore: upgrade dependencies"
git push origin "deps/auto-upgrade-${{ github.run_number }}"
# Create PR with description from file
tea pr create \
--title "⬆️ Automated Dependency Upgrade" \
--description "$PR_BODY" \
--labels "deps/bot"
- name: Summary
if: success()