feat: trigger E2E from PR label #7
This file contains 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: Bitrise E2E | |
on: | |
pull_request: | |
types: [labeled, unlabeled] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger | |
run: | | |
#!/bin/bash | |
echo "Trigger?." | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get PR details | |
id: pr_details | |
uses: actions/github-script@v3 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const pr = await github.pulls.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.issue.number | |
}); | |
return pr.data.labels.map(label => label.name); | |
# - name: Conditionally start Bitrise build | |
# run: echo "Skipping step" | |
# if: contains(steps.pr_details.outputs.result, 'Run E2E') | |
# uses: bitrise-steplib/bitrise-start-build-action@v0.0.4 | |
# with: | |
# app_slug: ${{ secrets.BITRISE_APP_SLUG }} | |
# api_token: ${{ secrets.BITRISE_API_TOKEN }} | |
# workflow_id: ios_e2e_test |