This workflow is meant to generate a file that msys2-web consumes, and just generates meaningless errors on forks. Forks can still trigger the workflow via workflow_dispatch, for developing/testing the workflow.
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: generate-srcinfo
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-srcinfo:
|
|
runs-on: windows-latest
|
|
if: ${{ github.repository == 'msys2/MINGW-packages' || github.event_name == 'workflow_dispatch' }}
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
install: python git mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain
|
|
update: true
|
|
|
|
- run: |
|
|
curl --fail -L --retry 5 -o srcinfo.json "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/srcinfo.json"
|
|
python ci-generate-srcinfo.py --time-limit 19800 mingw . srcinfo.json
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: result
|
|
path: srcinfo.json
|
|
|
|
upload-srcinfo:
|
|
needs: update-srcinfo
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: result
|
|
|
|
- uses: eine/tip@master
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: srcinfo-cache
|
|
rm: true
|
|
files: srcinfo.json
|