Skip to content

Update

Update #1

Workflow file for this run

name: Update
run-name: Update
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
jobs:
Check-Updates:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Check updates
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -eu
title='[BOT] Update Dependencies'
message=''
if [ "$(gh issue list --json 'id' --jq length --state 'open' --search "${title}")" != '0' ]; then
echo 'Issue already exists, skipping...'
exit 0
fi
pushd ./libfastjson
git fetch origin
if [ $(git rev-parse --verify origin/master) != $(git rev-parse --verify HEAD) ]; then
message="${message}- libfastjson is outdated"$'\n'
fi
popd
pushd ./libpatchelf/patchelf
git fetch origin
if [ $(git rev-parse --verify origin/master) != $(git rev-parse --verify HEAD) ]; then
message="${message}- patchelf is outdated"$'\n'
fi
popd
scripts/update-deps.py
if [ -n "$(git diff scripts/deps.sh)" ]; then
message="${message}- \`scripts/deps.sh\` is outdated"$'\n'
fi
if [ -n "${message}" ]; then
owner="$(gh repo view --json 'owner' --jq '.owner.login')"
gh issue create --assignee "${owner}" --title "${title}" --body "${message}"
fi