From 6bdbe5287819f620a392dbd6c6732a9088e273e2 Mon Sep 17 00:00:00 2001 From: Jake Champion Date: Mon, 27 Apr 2020 15:15:41 +0100 Subject: [PATCH] Update percy.yml --- .github/workflows/percy.yml | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index cf61d0b..1427974 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -13,39 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: Financial-Times/origami-percy@v1 with: - node-version: 12.x - - if: contains(github.event.pull_request.labels.*.name, 'percy') || endsWith(github.ref, '/master') - run: npx origami-build-tools install - - if: contains(github.event.pull_request.labels.*.name, 'percy') || endsWith(github.ref, '/master') - run: npx origami-build-tools demo - - if: contains(github.event.pull_request.labels.*.name, 'percy') || endsWith(github.ref, '/master') - name: Percy Test - uses: percy/snapshot-action@v0.1.0 - with: - build-directory: "demos/local" + github-token: ${{secrets.ORIGAMI_FOX_ACCESS_TOKEN}} # To comment as the Fox mascot GitHub user env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} - - if: contains(github.event.pull_request.labels.*.name, 'percy') - uses: actions/github-script@0.9.0 - with: - github-token: ${{secrets.ORIGAMI_FOX_ACCESS_TOKEN}} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '👋 Percy has finished running the visual regression testing!' - }) - - if: contains(github.event.pull_request.labels.*.name, 'percy') - uses: actions/github-script@0.9.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.issues.removeLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['percy'] - })