Skip to content

refactor(ci): Modularize workflows #2

refactor(ci): Modularize workflows

refactor(ci): Modularize workflows #2

Workflow file for this run

name: Schedule
on:
push:
branches:
- main
schedule:
- cron: '0 0,6,12,18 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
release_check:
name: Release Check
runs-on: ubuntu-latest
container: archlinux:base-devel
timeout-minutes: 5
outputs:
list: ${{ steps.releases.outputs.list_updates }}
steps:
- name: Update system and install dependencies
run: |
pacman-key --init
pacman -Syu --noconfirm fd jq wget
- name: Download bumper binary
run: |
cd $HOME
wget 'https://github.com/bcyran/bumper/releases/download/v1.0.0/bumper-1.0.0-linux-amd64.tar.gz'
tar xf bumper-1.0.0-linux-amd64.tar.gz
chmod +x bumper
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Check for new releases
id: releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: sh
run: |
updates=()
for dir in $(fd --type d --exclude jackett --exclude blockify-git --exclude="*-git")
do
pushd ${dir%/}
result=$(${HOME}/bumper --bump=false | grep -i → | wc -l)
if [ $result = 1 ]; then
updates+=("${dir%/}")
fi
popd
done
echo "list_updates=$(jq -cn '$ARGS.positional' --args "${updates[@]}")" >> $GITHUB_OUTPUT
build:
name: Build
needs: release_check
uses: ./.github/workflows/build.yml

Check failure on line 63 in .github/workflows/schedule.yml

View workflow run for this annotation

GitHub Actions / Schedule

Invalid workflow file

The workflow is not valid. In .github/workflows/schedule.yml (Line: 63, Col: 11): Error from called workflow txtsd/ankylosaurus/.github/workflows/build.yml@28fdc5f1ff604490af12d51fbc8d0f1f0674f1a5 (Line: 12, Col: 3): The workflow must contain at least one job with no dependencies.
with:
packages: needs.release_check.outputs.list