CI #10
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: CI | |
# Controls when the workflow will run | |
on: | |
schedule: | |
- cron: '0 0 * * WED' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: self-hosted | |
timeout-minutes: 2880 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Runs a single command using the runners shell | |
- name: Check all packages against Repology | |
run: | | |
export DOCKER_DEFAULT_PLATFORM=linux/amd64 | |
rm -rf src | |
git clone https://github.com/kreatolinux/src | |
cd src | |
make deps | |
make chkupd | |
mv scripts/jsontomd.sh /tmp/ | |
mv out/chkupd /tmp/ | |
cd .. | |
rm -rf src | |
cd /tmp/ | |
./chkupd checkAll --jsonPath=/tmp/chkupd.json --repo="$GITHUB_WORKSPACE" | |
bash jsontomd.sh /tmp/chkupd.json > /tmp/chkupd.md | |
- name: Check all packages against Arch Repositories | |
run: | | |
export DOCKER_DEFAULT_PLATFORM=linux/amd64 | |
cd /tmp/ | |
./chkupd checkAll --jsonPath=/tmp/chkupd.json --backend="arch" --repo="$GITHUB_WORKSPACE" | |
echo "# Arch check results" >> /tmp/chkupd.md | |
bash jsontomd.sh /tmp/chkupd.json >> /tmp/chkupd.md | |
rm -rf chkupd jsontomd.sh | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5.0.2 | |
with: | |
commit-message: "[CI] Automated update by chkupd" | |
body-path: /tmp/chkupd.md | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: json | |
path: /tmp/chkupd.json |