Skip to content

Commit ebb5aa3

Browse files
authored
chore: adjust update screenshots workflow (#250)
1 parent 5f79fdf commit ebb5aa3

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/actions/setup-playwright/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ runs:
2424
- name: Install Playwright Dependencies
2525
shell: bash
2626
if: steps.playwright-cache.outputs.cache-hit != 'true'
27-
run: npx playwright install --with-deps --only-shell
27+
run: npx playwright install chromium --with-deps --only-shell

.github/workflows/updtae-screenshots.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ env:
1010
COMMIT_MESSAGE: |
1111
test: update visual regression screenshots
1212
13-
Co-authored-by: ${{ github.event.sender.name }} <${{ github.event.sender.id }}+${{ github.event.sender.name }}@users.noreply.github.com>
13+
Co-authored-by: ${{ github.event.sender.name }} <${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com>
1414
1515
jobs:
1616
update-screenshots:
1717
runs-on: ubuntu-latest
1818

19-
if: ${{ github.event.issue.pull_request && !github.event.issue.pull_request.merged_at && contains(github.event.comment.body, '/update-screenshots') }}
19+
if: ${{ github.event.issue.pull_request && !github.event.issue.pull_request.merged_at && contains(github.event.comment.body, '/update-screenshots') }}
2020

2121
# one at a time per branch
2222
concurrency:
@@ -42,6 +42,11 @@ jobs:
4242
app-id: ${{ secrets.GRAVITY_UI_APP_ID }}
4343
private-key: ${{ secrets.GRAVITY_UI_APP_PRIVATE_KEY }}
4444

45+
- name: Set eyes emoji
46+
id: start_working
47+
run: |
48+
echo "reaction_id=$(gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions -f 'content=eyes' | jq .id)" >> $GITHUB_OUTPUT
49+
4550
- name: Checkout pull request
4651
run: gh pr checkout ${{ github.event.issue.number }}
4752
env:
@@ -94,6 +99,11 @@ jobs:
9499
env:
95100
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
96101

102+
- name: Set done emoji
103+
run: |
104+
gh api --method DELETE repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions/${{ steps.start_working.outputs.reaction_id }}
105+
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions -f 'content=${{ steps.check_changes.outputs.changes == 'true' && '+1' || 'confused' }}'
106+
97107
# pretty summary for humans
98108
- name: Summary
99109
run: |

0 commit comments

Comments
 (0)