66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: generate-srcinfo
|
|
|
|
concurrency: ci-${{ github.ref }}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-srcinfo:
|
|
runs-on: windows-2022
|
|
if: ${{ github.repository == 'msys2/MSYS2-packages' || github.event_name == 'workflow_dispatch' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
update: true
|
|
|
|
- name: Download srcinfo.json.gz and set up the environment
|
|
shell: msys2 {0}
|
|
run: |
|
|
# XXX: linting PKGBUILDs takes a loooong time, this skips it
|
|
sed -i s/^lint_pkgbuild/#lint_pkgbuild/g /usr/bin/makepkg
|
|
# makepkg requires strip in PATH even if it wont be used
|
|
touch /usr/bin/strip.exe
|
|
curl --fail -L --retry 5 -o srcinfo.json.gz "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/srcinfo.json.gz"
|
|
|
|
- name: Parse PKGBUILDs and update srcinfo.json.gz
|
|
run: |
|
|
$MSYS2_ROOT=(msys2 -c 'cygpath -w /')
|
|
python -u .ci/ci-generate-srcinfo.py --time-limit 19800 msys "$MSYS2_ROOT" . srcinfo.json.gz
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: result
|
|
path: srcinfo.json.gz
|
|
|
|
upload-srcinfo:
|
|
needs: update-srcinfo
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: result
|
|
|
|
- name: Upload srcinfo.json.gz
|
|
run: |
|
|
gh release upload srcinfo-cache srcinfo.json.gz --clobber --repo "$GITHUB_REPOSITORY"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- run: |
|
|
curl -X POST 'https://packages.msys2.org/api/trigger_update'
|