provide admin access to deployr user on deployment machine #83
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: Trigger on Comment | ||
on: | ||
issue_comment: | ||
types: [created] | ||
permissions: | ||
contents: read | ||
issues: read | ||
pull-requests: read | ||
statuses: write | ||
jobs: | ||
parse-args: | ||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/run e2e') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Parse relayer version | ||
id: relay | ||
run: | | ||
echo "RELAYER_VERSION=$(echo ${{ github.event.comment.body }} | sed -n 's/.*\/run e2e \(.*\)/\1/p')" >> $GITHUB_ENV | ||
outputs: | ||
relayer_version: ${{ steps.relay.outputs.RELAYER_VERSION }} | ||
start-runner: | ||
needs: parse-args | ||
uses: ./.github/workflows/runner-start.yml | ||
Check failure on line 23 in .github/workflows/e2e-runner.yml
|
||
secrets: inherit | ||
with: | ||
relayer_version: ${{ needs.parse-args.outputs.relayer_version }} | ||
e2e: | ||
name: E2E tests | ||
runs-on: ${{ needs.start-runner.outputs.label }} | ||
needs: start-runner | ||
steps: | ||
- name: Get PR branch | ||
uses: xt0rted/pull-request-comment-branch@v2 | ||
id: comment-branch | ||
- name: Set latest commit status as pending | ||
uses: myrotvorets/set-commit-status-action@master | ||
with: | ||
sha: ${{ steps.comment-branch.outputs.head_sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
status: pending | ||
- name: Checkout PR branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ steps.comment-branch.outputs.head_ref }} | ||
- name: Run e2e tests | ||
run: ./scripts/execute-test.sh --clean --use-docker --build-ibc --build-xcall --xcall-branch main --test e2e | ||
- name: Set latest commit status as ${{ job.status }} | ||
uses: myrotvorets/set-commit-status-action@master | ||
if: always() | ||
with: | ||
sha: ${{ steps.comment-branch.outputs.head_sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
status: ${{ job.status }} | ||
stop-runner: | ||
uses: ./.github/workflows/runner-stop.yml | ||
secrets: inherit | ||
with: | ||
label: ${{ needs.start-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} | ||
needs: | ||
- start-runner | ||
- e2e |