Skip to content

Commit

Permalink
pass token to action and remove extraneous git commands
Browse files Browse the repository at this point in the history
  • Loading branch information
angusbayley committed Dec 16, 2024
1 parent a11ded9 commit 4a4f0a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/generate-screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
id: update-snapshots
with:
os: ubuntu-22.04
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

report-start:
name: Report start
Expand Down
31 changes: 17 additions & 14 deletions tools/actions/composites/update-snapshots-desktop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
os:
description: "name of the os (same as runs-on)"
required: true
GITHUB_TOKEN:
description: "GitHub token"
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -42,30 +45,30 @@ runs:
echo "changes=$(git status -s)"
shell: bash

- name: Add snapshots
if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }}
run: |
git add ./apps/ledger-live-desktop/tests/specs
shell: bash
# - name: Add snapshots
# if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }}
# run: |
# git add ./apps/ledger-live-desktop/tests/specs
# shell: bash

- name: Commit file
if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }}
uses: swinton/commit@v2.x
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
with:
files: |
./apps/ledger-live-desktop/tests/specs*
commit-message: "test(lld): update screenshots (${{ inputs.os }}) ${{ steps.changes.outputs.changes }} lld, test, screenshot"

- name: Rebase and push
if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }}
run: |
git restore . &&
git pull --rebase &&
git push ||
echo ""
shell: bash
# - name: Rebase and push
# if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }}
# run: |
# git restore . &&
# git pull --rebase &&
# git push ||
# echo ""
# shell: bash

- name: Upload playwright results [On Failure]
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 4a4f0a2

Please sign in to comment.