Add integration tests workflow #7
Workflow file for this run
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: Remove safe-to-test label when new commits are pushed | |
| on: | |
| pull_request: | |
| types: [synchronize] | |
| jobs: | |
| remove-label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| env: | |
| LABEL_NAME: safe-to-test | |
| REPO: ${{ github.event.pull_request.base.repo.full_name }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| steps: | |
| - name: Remove label | |
| run: | | |
| echo "Removing label '$LABEL_NAME' from PR #$PR_NUMBER on repo $REPO" | |
| gh_status=$(gh api "repos/$OWNER/$REPO/issues/$PR_NUMBER/labels/$LABEL_NAME" -X DELETE | jq ".status" --raw-output) | |
| case $gh_status in | |
| 200) echo "Label removed" ;; | |
| 404) echo "Label not found — ignoring" ;; | |
| *) echo "unexpected HTTP $gh_status" && exit 1 ;; | |
| esac | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |