Skip to content

CI

CI #96

Workflow file for this run

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:
jobs:
# This workflow contains a single job called "build"
init:
runs-on: ubuntu-latest
container: ghcr.io/kreatolinux/builder
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Initialize chkupd
id: set-matrix
run: |
rm -rf src
git clone https://github.com/kreatolinux/src
cd src
sed -i s/stable/master/g Makefile
nimble install cligen fuzzy libsha -y
./build.sh -d -p "chkupd"
mv out/chkupd /tmp/
cd ..
rm -rf src
cd /tmp/
./chkupd generateJson --repo="$GITHUB_WORKSPACE" --output="/tmp/out1.json"
echo "matrix=$(cat /tmp/out1.json)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@master
with:
name: chkupd-bin
path: /tmp/chkupd
#- name:
#- 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
#./out/chkupd jsonToMd /tmp/chkupd.json >> /tmp/chkupd.md
#rm -rf chkupd
#- name: Create Pull Request
#uses: peter-evans/[email protected]
#with:
#commit-message: "[CI] Automated update by chkupd"
build:
needs: init
runs-on: ubuntu-latest
container: ghcr.io/kreatolinux/builder
strategy:
matrix: ${{fromJson(needs.init.outputs.matrix)}}
steps:
- uses: actions/download-artifact@v4
with:
name: chkupd-bin
path: /tmp/chkupd
- uses: actions/checkout@v3
- name: Build packages
run: |
for package in ${{ matrix.packages }}; do
/tmp/chkupd/chkupd repologyCheck --package="$package" --repo="$GITHUB_WORKSPACE" --autoUpdate=true --autoBuild=true
done
kpkg build kpkg -y
kpkg clean --binaries=true
kpkg build ${{ matrix.packages }} --yes
- uses: actions/upload-artifact@v4
with:
name: packages
path: /var/cache/kpkg/arch/
# TODO
#finish:
# needs: build
# runs-on: ubuntu-latest