Check for new Releases #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for new Releases | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0,6,12,18 * * *' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release_check: | |
name: Release Check | |
runs-on: ubuntu-latest | |
container: archlinux:base-devel | |
timeout-minutes: 5 | |
steps: | |
- name: Install dependencies in Arch container | |
run: | | |
pacman -Syu --noconfirm fd | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Grab author and repo name for version check | |
run: | | |
set -x | |
for dir in $(fd --type d) | |
do | |
pushd $dir | |
author_repo=($(sed -nr "s|\s*source[^ ]* =.*https://github.com/([^/]+)/([^\.\/\#]*).*|\1 \2|p" .SRCINFO)) | |
if ! [[ -z "${author_repo+x}" ]]; then | |
author=${author_repo[0]} | |
repo=${author_repo[1]} | |
echo pkg_author=$author >> $GITHUB_ENV | |
echo pkg_repo=$repo >> $GITHUB_ENV | |
echo pkg_source=github >> $GITHUB_ENV | |
else | |
echo "source is not github" | |
fi | |
popd | |
done | |
set +x |