Skip to content

Commit

Permalink
run optic run in action
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-Herve committed Sep 5, 2023
1 parent cf32580 commit 23686ec
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/optic_pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: optic
on:
pull_request:
push:

jobs:
diff-all:
Expand All @@ -10,14 +9,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Log some env vars
run: echo $GITHUB_EVENT_PATH, $GITHUB_REPOSITORY, $GITHUB_SHA
- name: Install Optic
run: npm install --location global @useoptic/[email protected]

- name: Log GH token
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}; echo $GITHUB_TOKEN

- name: Log pr number
run: echo $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")

- name: Log base ref
run: echo $GITHUB_BASE_REF
- name: Run Optic
run: OPTIC_ENV=staging OPTIC_TOKEN="oidMDU4MmI1YzQtNTQwMS00YjIxLWI2Y2ItMDFmNGU0ODlkYWI3.ZBWfGe1k1noEvGGcKTtJG.-_KL_7gZsqLqfetE7iLm4" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} optic run --base "gitbranch:$GITHUB_BASE_REF" --comment

0 comments on commit 23686ec

Please sign in to comment.