.github/workflows/ood.yml #97
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 6' | |
jobs: | |
ood: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Out of date | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/mirror.key | |
sudo chmod 600 ~/.ssh/mirror.key | |
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts | |
set -x | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'example@example.com' | |
sudo apt install libarchive-tools | |
sudo rm -f /usr/bin/tar | |
sudo ln -s bsdtar /usr/bin/tar | |
tar --version | |
./scripts/ood.sh | |
if [ ! -f ood.list ] | |
then | |
exit 0 | |
fi | |
cat ood.list | |
# ./scripts/fetch_autobuild.sh | |
for pkg in $(cat ood.list) | |
do | |
./scripts/updatever.sh $(dirname $pkg) $(basename $pkg) | |
./scripts/setup_sysroot.sh $pkg | |
if ./scripts/check_builds.sh $pkg | |
then | |
git add $pkg/build.sh | |
git commit -m "bump $pkg" | |
fi | |
done | |
# we need to reset the changes that didn't stick | |
# so we can create an issue about still out of date packages | |
git reset --hard | |
./scripts/ood.sh | tee -a issue.md | |
if [ ! -z "$(cat issue.md)" ] | |
then | |
gh issue create -t "Out of date packages $(date -I)" -Fissue.md | |
fi | |
git push -u origin main | |
env: | |
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}} | |
SSH_KNOWN_HOST: ${{secrets.SSH_KNOWN_HOST}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |