jobs: - name: Run my job commands: # Get PR labels from github api - > if [ ! -z "$SEMAPHORE_GIT_PR_NUMBER" ]; then export PR_DETAILS=$(curl -fsS -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/ORG_NAME/REPO_NAME/pulls/$SEMAPHORE_GIT_PR_NUMBER); export PR_LABELS=$(echo $PR_DETAILS | tr '\r\n' ' ' | jq '.labels[] | .name'); fi - echo $PR_LABELS # Run job unless PR contains specific labels contains skip/me - > if [[ $PR_LABELS =~ "skip/me" ]]; then echo "Skip job because the PR is labelled with skip/me"; else echo "Run my job"; test fi