-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.6 KB
/
schedule.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Schedule
on:
schedule:
- cron: '0 0,6,12,18 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
release_check:
name: Release Check
runs-on: ubuntu-latest
container: ghcr.io/archlinux/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="*-git" --exclude="*-cvs" --exclude="*-svn" --exclude="*-hg" --exclude="*-darcs" --exclude="*-bzr")
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
with:
packages: ${{ needs.release_check.outputs.list }}