Daily Package check #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |