CI: test build #64
This file contains hidden or 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: Test Formalities | |
| on: | |
| pull_request_target: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| formalities: | |
| name: Test Formalities | |
| uses: openwrt/actions-shared-workflows/.github/workflows/formal.yml@main | |
| with: | |
| post_comment: true | |
| label_formality_status: | |
| name: Add Formality Status | |
| runs-on: ubuntu-slim | |
| needs: formalities | |
| if: always() | |
| steps: | |
| - name: Trigger build | |
| if: needs.formalities.result == 'success' | |
| run: | | |
| JSON_PAYLOAD=$(jq -n \ | |
| --arg pr_number "${{ github.event.pull_request.number }}" \ | |
| --arg pr_name "${{ github.event.pull_request.title }}" \ | |
| '{ref: "master", inputs: {pr_number: $pr_number, pr_name: $pr_name}}') | |
| curl -L \ | |
| -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${{ secrets.DEFAULT_TOKEN }}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| "https://api.github.com/repos/${{ github.repository }}/actions/workflows/multi-arch-test-build.yml/dispatches" \ | |
| -d "$JSON_PAYLOAD" | |
| - name: Add 'not following guidelines' label | |
| if: needs.formalities.result == 'failure' | |
| uses: buildsville/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| labels: "not following guidelines" | |
| type: add | |
| - name: Remove 'not following guidelines' label | |
| if: needs.formalities.result == 'success' | |
| uses: buildsville/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| labels: "not following guidelines" | |
| type: remove |