Update Components #99142
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: Update Components | |
##trying to do this all in yaml, even though it is deeply painful | |
##also trying to avoid uneeded clones | |
on: #[push] | |
schedule: | |
- cron: "*/15 * * * *" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
container: 'debian:11' | |
env: | |
commit_needed: no | |
repo_dir: . | |
steps: | |
- name: install needed tools | |
run: apt-get update; apt-get -y install wget git curl | |
# - name: check for updated bullseye armel installer | |
# run: curl -sL "http://ftp.nl.debian.org/debian/dists/bullseye/main/installer-armel/current/images/kirkwood/netboot/initrd.gz" 2>/dev/null | md5sum > /tmp/source | |
# - name: check for updated bullseye armel installer | |
# run: wget -O /tmp/dest "https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Bullseye/installer_images/build/last_build_armel.txt" | |
# - name: check for updated bullseye armel installer | |
# run: diff /tmp/source /tmp/dest || echo "commit_needed=yes" >> $GITHUB_ENV | |
- name: check for updated bullseye armhf installer | |
run: curl -sL "http://ftp.nl.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/network-console/initrd.gz" 2>/dev/null | md5sum > /tmp/source | |
- name: check for updated bullseye armhf installer | |
run: wget -O /tmp/dest "https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Bullseye/installer_images/build/last_build_armhf.txt" | |
- name: check for updated bullseye armhf installer | |
run: diff /tmp/source /tmp/dest || echo "commit_needed=yes" >> $GITHUB_ENV | |
- name: check for updated bookworm armhf installer | |
run: curl -sL "http://ftp.nl.debian.org/debian/dists/bookworm/main/installer-armhf/current/images/network-console/initrd.gz" 2>/dev/null | md5sum > /tmp/source | |
- name: check for updated bookworm armhf installer | |
run: wget -O /tmp/dest "https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Bookworm/installer_images/build/last_build_armhf.txt" | |
- name: check for updated bookworm armhf installer | |
run: diff /tmp/source /tmp/dest || echo "commit_needed=yes" >> $GITHUB_ENV | |
- name: if needed, clone the repo for update | |
if: env.commit_needed == 'yes' | |
run: git clone https://github.com/${{github.repository}}; echo "repo_dir=$(ls -rt | tail -n 1)" >> $GITHUB_ENV | |
- name: if needed, setup git | |
if: env.commit_needed == 'yes' | |
run: git config user.name "workflow@github"; git config user.email "workflow@github" | |
working-directory: "${{env.repo_dir}}" | |
- name: set rebuild needed flag | |
if: env.commit_needed == 'yes' | |
run: echo yes > .rebuild | |
working-directory: "${{env.repo_dir}}" | |
- name: if needed, commit | |
if: env.commit_needed == 'yes' | |
run: git commit -a -m "update files from external projects" || exit 0 | |
working-directory: "${{env.repo_dir}}" | |
- name: if needed, push | |
if: env.commit_needed == 'yes' | |
run: git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:master | |
working-directory: "${{env.repo_dir}}" |