|
| 1 | +name: Reusable action of running integration of production suite |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + secrets: |
| 6 | + CI_USER_TOKEN: |
| 7 | + required: true |
| 8 | + TRAVIS_COM_TOKEN: |
| 9 | + required: true |
| 10 | +jobs: |
| 11 | + test: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v3 |
| 15 | + with: |
| 16 | + # You should create a personal access token and store it in your repository |
| 17 | + token: ${{ secrets.CI_USER_TOKEN }} |
| 18 | + repository: 'optimizely/travisci-tools' |
| 19 | + path: 'home/runner/travisci-tools' |
| 20 | + ref: 'master' |
| 21 | + - name: set SDK Branch if PR |
| 22 | + if: ${{ github.event_name == 'pull_request' }} |
| 23 | + run: | |
| 24 | + echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV |
| 25 | + - name: set SDK Branch if not pull request |
| 26 | + if: ${{ github.event_name != 'pull_request' }} |
| 27 | + run: | |
| 28 | + echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV |
| 29 | + echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV |
| 30 | + - name: Trigger build |
| 31 | + env: |
| 32 | + SDK: react |
| 33 | + REPO_SLUG: optimizely/react-sdk-e2e-tests |
| 34 | + FULLSTACK_TEST_REPO: ${{ inputs.FULLSTACK_TEST_REPO }} |
| 35 | + BUILD_NUMBER: ${{ github.run_id }} |
| 36 | + TESTAPP_BRANCH: master |
| 37 | + GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }} |
| 38 | + TRAVIS_EVENT_TYPE: ${{ github.event_name }} |
| 39 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 40 | + TRAVIS_REPO_SLUG: ${{ github.repository }} |
| 41 | + TRAVIS_PULL_REQUEST_SLUG: ${{ github.repository }} |
| 42 | + UPSTREAM_REPO: ${{ github.repository }} |
| 43 | + TRAVIS_COMMIT: ${{ github.sha }} |
| 44 | + TRAVIS_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} |
| 45 | + TRAVIS_PULL_REQUEST: ${{ github.event.pull_request.number }} |
| 46 | + UPSTREAM_SHA: ${{ github.sha }} |
| 47 | + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} |
| 48 | + EVENT_MESSAGE: ${{ github.event.message }} |
| 49 | + HOME: 'home/runner' |
| 50 | + run: | |
| 51 | + echo "$GITHUB_CONTEXT" |
| 52 | + home/runner/travisci-tools/trigger-script-with-status-update.sh |
0 commit comments