-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (56 loc) · 1.66 KB
/
package-check.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
name: Daily Package check
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
meta:
name: Ingest Metadata
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-meta.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-meta
run: |
curl -o yq -L "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64"
chmod +x yq
echo "matrix=$(./yq -o=j -I=0 '.' metadata/metadata.yml)" >> $GITHUB_OUTPUT
pupdate:
runs-on: ubuntu-latest
needs: meta
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- run: bash ci-scripts/update-packages.sh ${{ matrix.name }}
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ matrix.name }}
if-no-files-found: ignore
path: apps/${{ matrix.name }}/package_versions.txt
retention-days: 1
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.meta.outputs.matrix) }}
pcommit:
runs-on: ubuntu-latest
if: success() || failure()
needs: pupdate
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- uses: actions/download-artifact@v4
with:
path: artifacts
- run: rsync -av artifacts/* apps/
- run: |
git config --global user.name 'Package Bot'
git config --global user.email 'package-bot@users.noreply.github.com'
cd apps
git add .
git diff --quiet HEAD || git commit -m "Bot Updating Package Versions" && git push origin master