|
| 1 | +name: Check requirements |
| 2 | + |
| 3 | +on: |
| 4 | + # Run every monday at noon |
| 5 | + schedule: |
| 6 | + - cron: 0 12 * * 1 |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + reqcheck: |
| 11 | + name: Check for new requirements versions |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + # Get the Git SHA used in WebKit |
| 16 | + - name: Determine vcpkg sha |
| 17 | + uses: actions/github-script@v8 |
| 18 | + id: get-sha |
| 19 | + with: |
| 20 | + result-encoding: string |
| 21 | + script: | |
| 22 | + const res = await fetch('https://raw.githubusercontent.com/WebKit/WebKit/refs/heads/main/vcpkg-configuration.json'); |
| 23 | + if (res.ok) { |
| 24 | + const data = await res.json(); |
| 25 | + return data['default-registry']['baseline']; |
| 26 | + } |
| 27 | + return ''; |
| 28 | +
|
| 29 | + - uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + repository: microsoft/vcpkg |
| 32 | + ref: ${{ steps.get-sha.outputs.result }} |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + with: |
| 35 | + path: WebKitRequirements |
| 36 | + |
| 37 | + # Download reqcheck locally |
| 38 | + - name: Download reqcheck |
| 39 | + uses: robinraju/release-downloader@v1 |
| 40 | + with: |
| 41 | + repository: WebKitForWindows/reqcheck |
| 42 | + latest: true |
| 43 | + fileName: reqcheck_linux_amd64.tar.gz |
| 44 | + - name: Unzip reqcheck |
| 45 | + run: tar -zxvf reqcheck_linux_amd64.tar.gz |
| 46 | + - name: Verify reqcheck |
| 47 | + run: ./reqcheck --help |
| 48 | + - name: Add config |
| 49 | + run: cp WebKitRequirements/.reqcheck.yml .reqcheck.yml |
| 50 | + |
| 51 | + # Run the command |
| 52 | + - name: Run reqcheck |
| 53 | + run: ./reqcheck vcpkg --slack --output-file results.json --overlay WebKitRequirements . |
| 54 | + env: |
| 55 | + github_public_token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + gitlab_freedesktop_token: ${{ secrets.GITLAB_FREEDESKTOP_TOKEN }} |
| 57 | + |
| 58 | + # Notify the results to WebKit slack |
| 59 | + - name: Forward a saved message |
| 60 | + uses: slackapi/slack-github-action@v2 |
| 61 | + with: |
| 62 | + payload-file-path: results.json |
| 63 | + payload-templated: true |
| 64 | + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 65 | + webhook-type: incoming-webhook |
| 66 | + env: |
| 67 | + SLACK_CHANNEL_ID: windows |
0 commit comments