Skip to content

CI

CI #91

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
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Initialize chkupd
id: matrix-json
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 "CHKUPD_JSON=$(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
strategy:
matrix: ${{fromJson(needs.matrix-json.outputs.CHKUPD_JSON)}}
steps:
- run: echo ${{ matrix.package }}
- run: echo ${{ matrix.repository }}
# TODO
#finish:
# needs: build
# runs-on: ubuntu-latest