Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
586d912
Create bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
17657aa
Merge branch 'Sylius:2.0' into 2.0
github-actions[bot] Nov 19, 2024
1f625b4
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
227f50a
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
02556ef
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
3ed00e5
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
cb1be57
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 19, 2024
af52949
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 21, 2024
5834400
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Nov 21, 2024
fa28ad0
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 21, 2024
10d09e7
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 22, 2024
cab53c4
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 23, 2024
a7a66e6
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 25, 2024
2189522
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 26, 2024
cb55159
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 27, 2024
550a820
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 28, 2024
ee92f5e
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Nov 29, 2024
bee94e1
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 3, 2024
cb41590
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 4, 2024
25ae9a1
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 5, 2024
d934eb2
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 6, 2024
7dacd5a
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 7, 2024
0569081
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 11, 2024
052b8bc
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 12, 2024
fd24587
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 14, 2024
248b87d
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 18, 2024
b682ab9
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 19, 2024
c6c7df5
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 20, 2024
29b6934
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Dec 21, 2024
fdfad57
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 4, 2025
97417a1
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 8, 2025
5809eb2
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 10, 2025
4d2a83a
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 11, 2025
4124adb
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 14, 2025
92a20c0
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 17, 2025
8cc86da
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 18, 2025
b8658c9
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 29, 2025
cfccc1a
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Jan 31, 2025
62630bf
Merge branch 'Sylius:2.0' into 2.0
bunnyshellcloud Feb 4, 2025
3adcaf3
Update bunnyshell-sync-fork-2.0.yaml
mihaichitic Feb 6, 2025
3c959c8
Test Update copy.html.twig
mihaichitic Feb 6, 2025
7c5d09d
Update copy.html.twig
mihaichitic Feb 9, 2026
2b1ab53
Update copy.html.twig
mihaichitic Feb 9, 2026
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
79 changes: 79 additions & 0 deletions .github/workflows/bunnyshell-sync-fork-2.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Bunnyshell - Sync Fork 2.0

on:
schedule:
- cron: '0 0 * * *' # at midnight
workflow_dispatch: # on button click
inputs:
force_update:
description: "Force the update even if nothing changed"
required: false
default: "false"

jobs:
sync-and-tweak:
runs-on: ubuntu-latest
env:
BNS_GIT_DEST_REPO_URL: 'https://github.com/bunnyshell/OSS-Sylius.git'
BNS_GIT_DEST_REPO_NAME: 'bunnyshell/OSS-Sylius'
BNS_GIT_DEST_BRANCH: '2.0-bns'
BNS_GIT_FOLLOW_BRANCH: '2.0'
BNS_YAML_PATH: '.bunnyshell/templates/preview/bunnyshell.yaml'

steps:
- name: Sync branch with upstream
env:
GH_TOKEN: ${{ secrets.GH_SYNC_PAT }}
run: |
gh --version
# this works because BNS_GIT_FOLLOW_BRANCH is the default branch
PRE_SYNC_COMMIT=$(gh api repos/${BNS_GIT_DEST_REPO_NAME}/commits/${BNS_GIT_FOLLOW_BRANCH} --jq '.sha')
gh repo sync ${BNS_GIT_DEST_REPO_NAME} --branch ${BNS_GIT_FOLLOW_BRANCH} --force
POST_SYNC_COMMIT=$(gh api repos/${BNS_GIT_DEST_REPO_NAME}/commits/${BNS_GIT_FOLLOW_BRANCH} --jq '.sha')
if [ "$PRE_SYNC_COMMIT" = "$POST_SYNC_COMMIT" ]; then
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
else
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
fi

- name: Stop Workflow If No Changes
if: env.CHANGES_DETECTED == 'false' && inputs.force_update != 'true'
run: echo "No updates detected. Workflow stopping here."

- name: Checkout repository
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
uses: actions/checkout@v4
with:
fetch-depth: 1 # Fetch shallow history for efficiency
ref: ${{ env.BNS_GIT_FOLLOW_BRANCH }}

- name: Set config user
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
run: |
git config --global user.email "devops@bunnyshell.com"
git config --global user.name "Bunnyshell"

- name: Checkout to dest branch
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
run: |
git checkout --force -B ${BNS_GIT_DEST_BRANCH} refs/remotes/origin/${BNS_GIT_DEST_BRANCH}
git rebase ${BNS_GIT_FOLLOW_BRANCH} -X ours || (git rebase --abort && exit 1)

- name: Setup yq
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
uses: frenck/action-setup-yq@v1

- name: Update bunnyshell.yaml file
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
run: |
yq "(.components[] | select(.gitRepo != null)).gitRepo |= \"$BNS_GIT_DEST_REPO_URL\"" $BNS_YAML_PATH > $BNS_YAML_PATH-tmp
mv $BNS_YAML_PATH-tmp $BNS_YAML_PATH
yq "(.components[] | select(.gitBranch != null)).gitBranch |= \"$BNS_GIT_DEST_BRANCH\"" $BNS_YAML_PATH > $BNS_YAML_PATH-tmp
mv $BNS_YAML_PATH-tmp $BNS_YAML_PATH
yq "del(.components[].dockerCompose.cap_add)" -i $BNS_YAML_PATH
git add $BNS_YAML_PATH
git commit -m "Update bunnyshell.yaml" || echo "No changes to commit"

- name: Push Updates to dest branch
if: env.CHANGES_DETECTED == 'true' || inputs.force_update == 'true'
run: git push origin ${BNS_GIT_DEST_BRANCH} --force
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

<div class="mb-3">
&copy; {{ 'sylius.ui.your_store'|trans }}, {{ 'sylius.ui.powered_by'|trans }}
<a href="https://sylius.com" target="_blank">Sylius</a>
<a href="https://sylius.com" target="_blank">Sylius Test PR rrr</a>
</div>
</div>