ci(external): initial tests for external dependency checks

This commit is contained in:
Marc Cornellà 2023-10-30 20:58:24 +01:00
parent 38c01a235f
commit aae42b2109
No known key found for this signature in database
GPG Key ID: 0314585E776A9C1B
2 changed files with 30 additions and 0 deletions

7
.github/dependencies.yml vendored Normal file
View File

@ -0,0 +1,7 @@
dependencies:
- name: z
path: plugins/z
repo: agkozak/zsh-z
branch: master
version: 585d1b2c5ad1ca0b21256db401382d751cc7b2a9
other_stuff: 1

23
.github/workflows/external.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: External dependencies
on:
workflow_dispatch: {}
schedule:
- cron: '34 3 * * */8'
jobs:
check:
name: Check for updates
runs-on: ubuntu-latest
container: alpine:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install yq
run: apk add --no-cache yq
- name: Fetch updates
run: |
yq -o tsv '.dependencies' deps.yml | sed 1d | \
while read name path repo branch version; do
echo "Checking $name ($path)..."
endpoint="https://api.github.com/repos/${repo}/commits/${branch}"
done