Skip to content
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
fe69a3d
refactor(test): auto-commit regenerated snapshots
mfranzke Jun 2, 2025
7ad0ae6
chore: code structure
mfranzke Jun 2, 2025
7470e90
refactor: testing our functionality
mfranzke Jun 2, 2025
19b1cb6
chore: another try
mfranzke Jun 2, 2025
7666798
chore: let's try this first
mfranzke Jun 2, 2025
7ec1869
chore: another try
mfranzke Jun 2, 2025
bb27550
chore: another try
mfranzke Jun 2, 2025
0afe039
refactor: another try
mfranzke Jun 2, 2025
490f855
chore: another try
mfranzke Jun 2, 2025
9e94d26
refactor: another try
mfranzke Jun 2, 2025
5eb32e3
refactor: another try
mfranzke Jun 2, 2025
fb027be
chore: let's give this a try
mfranzke Jun 2, 2025
b83d771
chore: we won't need this
mfranzke Jun 2, 2025
1253ea2
Revert "chore: let's give this a try"
mfranzke Jun 2, 2025
4051578
refactor: let's give this a try
mfranzke Jun 2, 2025
99fb529
refactor(test): updated snapshots
github-actions[bot] Jun 2, 2025
80ace0f
refactor: another try
mfranzke Jun 2, 2025
aebdead
Revert "refactor(test): updated snapshots"
mfranzke Jun 2, 2025
8e4c9b2
refactor: let's give this a try
mfranzke Jun 2, 2025
38971d2
chore: corrected that
mfranzke Jun 2, 2025
2a9ffbe
refactor(test): updated snapshots
github-actions[bot] Jun 2, 2025
e7c7523
Revert "refactor(test): updated snapshots"
mfranzke Jun 2, 2025
60ce76e
refactor: corrected this aspect
mfranzke Jun 2, 2025
a499906
chore: another try
mfranzke Jun 2, 2025
3106211
refactor: another try
mfranzke Jun 2, 2025
4dd2cd4
refactor(test): updated snapshots
github-actions[bot] Jun 2, 2025
d196a69
Update 02-e2e-regenerate.yml
mfranzke Jun 3, 2025
476de11
Update infotext.scss
mfranzke Jun 3, 2025
ff9d69f
refactor(test): updated snapshots
github-actions[bot] Jun 3, 2025
880ac88
Update 02-e2e-regenerate.yml
mfranzke Jun 3, 2025
572b877
Revert "Update infotext.scss"
mfranzke Jun 3, 2025
4db32e5
refactor: using PAT
mfranzke Jun 3, 2025
2acb64f
refactor: let's make this conditionally
mfranzke Jun 3, 2025
409222b
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 3, 2025
260b6ed
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 3, 2025
043f237
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 3, 2025
ff6542d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 3, 2025
cfa06ff
fix: naming
mfranzke Jun 3, 2025
032f3e1
refactor: another try
mfranzke Jun 3, 2025
8f38ad8
refactor: another try
mfranzke Jun 3, 2025
7f8c791
fix: naming
mfranzke Jun 3, 2025
064ccf6
refactor(test): updated snapshots
github-actions[bot] Jun 3, 2025
dae346d
Revert "refactor(test): updated snapshots"
mfranzke Jun 3, 2025
d330954
fix: path
mfranzke Jun 3, 2025
d4dfabd
refactor(test): updated snapshots
github-actions[bot] Jun 3, 2025
f84c6a1
Revert "refactor(test): updated snapshots"
mfranzke Jun 4, 2025
c27e494
refactor: using a real user
mfranzke Jun 4, 2025
3f4537e
refactor(test): updated snapshots
mfranzke Jun 4, 2025
f4c8132
refactor: another try
mfranzke Jun 4, 2025
eac0328
Merge branch 'refactor-test-auto-commit-regenerated-snapshots' of htt…
mfranzke Jun 4, 2025
ea1d5f4
Revert "refactor(test): updated snapshots"
mfranzke Jun 4, 2025
945e0ed
refactor(test): updated snapshots
mfranzke Jun 4, 2025
09ddebd
refactor: another try
mfranzke Jun 4, 2025
986d6ac
Merge branch 'refactor-test-auto-commit-regenerated-snapshots' of htt…
mfranzke Jun 4, 2025
ad0a559
Revert "refactor(test): updated snapshots"
mfranzke Jun 4, 2025
4bc903c
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 4, 2025
3747b9d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 4, 2025
4d1724f
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 5, 2025
1ab1e3f
chore: update e2e-regenerate-snapshots-commit
nmerget Jun 10, 2025
c7ab5f2
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
nmerget Jun 10, 2025
a0917f6
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke Jun 10, 2025
117ad6b
Update .github/workflows/default.yml
mfranzke Jun 10, 2025
57444a9
chore: we won't need an approval
mfranzke Jun 10, 2025
4c6654d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 10, 2025
652c7e7
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 10, 2025
77d9345
Apply suggestions from code review
mfranzke Jun 10, 2025
cbdc15b
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke Jun 10, 2025
056323b
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 10, 2025
c6582ea
Revert "Update 02-e2e-regenerated-snapshots-commit.yml"
mfranzke Jun 10, 2025
0aa6143
refactor: another try
mfranzke Jun 10, 2025
fb84de3
Reapply "Update 02-e2e-regenerated-snapshots-commit.yml"
mfranzke Jun 10, 2025
5e4cda1
Revert "refactor: another try"
mfranzke Jun 11, 2025
a6023d1
refactor: another try
mfranzke Jun 11, 2025
7756f48
refactor: another try
mfranzke Jun 11, 2025
842cd45
refactor: another try
mfranzke Jun 11, 2025
96ca74d
auto update snapshots (#4355)
github-actions[bot] Jun 11, 2025
bd8ebe7
Revert "auto update snapshots (#4355)"
mfranzke Jun 11, 2025
8b18222
refactor: another try
mfranzke Jun 11, 2025
d78f648
Revert "refactor: another try"
mfranzke Jun 11, 2025
091ab3b
refactor: back for good
mfranzke Jun 11, 2025
8035801
chore: update 02-e2e-regenerated-snapshots-commit.yml
nmerget Jun 11, 2025
261cc72
fix: order
mfranzke Jun 11, 2025
65dc04b
fix: issue with wrong if statement
nmerget Jun 11, 2025
d43f674
chore: check why if is not triggered
nmerget Jun 11, 2025
d497e41
chore: trigger commit-regenerated-snapshots always
nmerget Jun 11, 2025
3070914
auto update snapshots (#4361)
github-actions[bot] Jun 11, 2025
71ab3dc
Update infotext.scss
mfranzke Jun 11, 2025
aef5f23
auto update snapshots (#4362)
github-actions[bot] Jun 11, 2025
3f93049
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke Jun 11, 2025
045b7d9
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke Jun 11, 2025
482a395
Update 00-init.yml
mfranzke Jun 11, 2025
1b5ddd9
Update infotext.scss
mfranzke Jun 11, 2025
d30c02f
auto update snapshots (#4363)
github-actions[bot] Jun 11, 2025
68af93d
Update infotext.scss
mfranzke Jun 11, 2025
5ca4dd3
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke Jun 11, 2025
fd27a05
auto update snapshots (#4364)
github-actions[bot] Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/00-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}

- name: 🚮 Dump GitHub context for debugging
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/02-e2e-regenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,28 +90,28 @@ jobs:
with:
name: snapshots-${{ inputs.type }}
path: ./__snapshots__/*/component
retention-days: 30
retention-days: 7

- name: 🆙 Upload foundations
if: always() && inputs.type == 'foundations'
uses: actions/upload-artifact@v4
with:
name: snapshots-${{ inputs.type }}
path: ./__snapshots__/foundations
retention-days: 30
retention-days: 7

- name: 🆙 Upload patternhub
if: always() && inputs.type == 'patternhub'
uses: actions/upload-artifact@v4
with:
name: snapshots-${{ inputs.type }}
path: ./__snapshots__/*/patternhub
retention-days: 30
retention-days: 7

- name: 🆙 Upload showcase
if: always() && inputs.type == 'showcases'
uses: actions/upload-artifact@v4
with:
name: snapshots-${{ inputs.type }}
path: ./__snapshots__/*/showcase
retention-days: 30
retention-days: 7
100 changes: 100 additions & 0 deletions .github/workflows/02-e2e-regenerated-snapshots-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Commit Regenerated Snapshots

on:
workflow_call:
inputs:
components:
description: "Regenerate snapshots for components"
required: true
type: boolean
foundations:
description: "Regenerate snapshots for foundations"
required: true
type: boolean
patternhub:
description: "Regenerate snapshots for patternhub"
required: true
type: boolean
showcases:
description: "Regenerate snapshots for showcases"
required: true
type: boolean

jobs:
commit-showcases:
name: 🆙 Commit regenerated snapshots
if: (inputs.showcases || inputs.components || inputs.foundations || inputs.patternhub) && !contains(github.actor,'[bot]')
runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
permissions:
contents: write
pull-requests: write
env:
NEW_PR_BRANCH: "${{ github.head_ref }}-auto"
steps:
- name: ⏬ Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: ⏬ Download components
uses: actions/download-artifact@v4
# Only download artifact if the artifact exists
if: inputs.components
with:
name: snapshots-components
path: ./__snapshots__/

- name: ⏬ Download foundations
uses: actions/download-artifact@v4
# Only download artifact if the artifact exists
if: inputs.foundations
with:
name: snapshots-foundations
path: ./__snapshots__/

- name: ⏬ Download patternhub
uses: actions/download-artifact@v4
if: inputs.patternhub
with:
name: snapshots-patternhub
path: ./__snapshots__/

- name: ⏬ Download showcase
uses: actions/download-artifact@v4
if: inputs.showcases
with:
name: snapshots-showcases
path: ./__snapshots__/

# https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
- name: 🧬 Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.AUTO_MERGE_APP_ID }}
private-key: ${{ secrets.AUTO_MERGE_PRIVATE_KEY }}

- name: 🏗️ Create new branch and commit changes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

git checkout -b "$NEW_PR_BRANCH"
git add __snapshots__/*

# We can't use semantic commits here because of the if statement in the workflow
git commit --no-verify -m "auto update snapshots"
git push -f origin "$NEW_PR_BRANCH"

- name: 🪗 Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --base ${{ github.head_ref }} --head "$NEW_PR_BRANCH" --title "Automated PR: Auto update snapshots" --body "This PR was created automatically by a GitHub Action."

- name: 🤖 Squash the PR
run: gh pr merge --squash "$NEW_PR_BRANCH"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
17 changes: 17 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,23 @@ jobs:
get-playwright-version
]

commit-regenerated-snapshots:
uses: ./.github/workflows/02-e2e-regenerated-snapshots-commit.yml
secrets: inherit
if: always()
needs:
[
regenerate-snapshots-components,
regenerate-snapshots-foundations,
regenerate-snapshots-patternhub,
regenerate-snapshots
]
with:
showcases: ${{ needs.regenerate-snapshots.result == 'success' }}
components: ${{ needs.regenerate-snapshots-components.result == 'success' }}
foundations: ${{ needs.regenerate-snapshots-foundations.result == 'success' }}
patternhub: ${{ needs.regenerate-snapshots-patternhub.result == 'success' }}

checks-done:
if: ${{ always() }}
runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
Expand Down
Loading