-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.03 KB
/
schedule-vcs.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
name: Schedule VCS
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
vcs_check:
name: VCS Check
runs-on: ubuntu-latest
container: ghcr.io/archlinux/archlinux:base-devel
timeout-minutes: 5
outputs:
list: ${{ steps.packages.outputs.list_packages }}
steps:
- name: Update system and install dependencies
run: |
pacman-key --init
pacman -Syu --noconfirm fd jq
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Check for VCS packages
id: packages
run: |
updates=()
for dir in $(fd --type d --regex ".*-git$|.*-cvs$|.*-svn$|.*-hg$|.*-darcs$|.*-bzr$")
do
updates+=("${dir%/}")
done
echo "list_packages=$(jq -cn '$ARGS.positional' --args "${updates[@]}")" >> $GITHUB_OUTPUT
build:
name: Build
needs: vcs_check
uses: ./.github/workflows/build.yml
with:
packages: ${{ needs.vcs_check.outputs.list }}