From 3948094b1781bd30beab6c0ce0899a59754dc3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Herv=C3=A9?= Date: Fri, 22 Sep 2023 12:30:24 +0200 Subject: [PATCH] Update optic.yml --- .github/workflows/optic.yml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/optic.yml b/.github/workflows/optic.yml index 0c6cf2d..a8b2aa8 100644 --- a/.github/workflows/optic.yml +++ b/.github/workflows/optic.yml @@ -1,26 +1,22 @@ name: optic on: + pull_request: push: branches: - - main - pull_request: - + - "main" + jobs: - diff-all: + run: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - - uses: opticdev/action@v1 - with: - # Your Optic Cloud Token - optic_token: ${{ secrets.OPTIC_TOKEN }} - - # A GitHub token with access to create comments on pull requests - github_token: ${{ secrets.GITHUB_TOKEN }} - - # If true, standard check failures will cause this action to fail. - # If false, standard check failures will show in PR comments and - # in Optic Cloud but will not cause the action to fail - standards_fail: true + + - name: Install Optic + run: npm install --location global @useoptic/optic + + - name: Run Optic + env: + OPTIC_TOKEN: ${{ secrets.OPTIC_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: optic run