Skip to content

Commit 2173389

Browse files
committed
ci: test sync starter diff
1 parent 65531a4 commit 2173389

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/sync-starter.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Sync Starter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- ci_starter_repo
8+
9+
concurrency:
10+
group: sync-starter
11+
cancel-in-progress: true
12+
13+
jobs:
14+
sync-starter:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout starter repo
18+
uses: actions/checkout@v6
19+
with:
20+
repository: graycoreio/magento2-devcontainer-starter
21+
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
22+
submodules: true
23+
24+
- name: Update submodule
25+
working-directory: .devcontainer/magento2-devcontainer
26+
run: |
27+
git fetch origin main
28+
git checkout origin/main
29+
30+
- name: Remove existing generated files
31+
working-directory: .devcontainer
32+
run: |
33+
find . -maxdepth 1 -not -name 'magento2-devcontainer' -not -name '.' -exec rm -rf {} +
34+
35+
- name: Run init.sh
36+
run: |
37+
printf '\n\n' | .devcontainer/magento2-devcontainer/bin/init.sh
38+
39+
- name: Commit and push
40+
run: |
41+
git add -A
42+
if ! git diff --staged --quiet; then
43+
git commit -m "chore: sync devcontainer ${GITHUB_SHA::7}"
44+
git push
45+
fi

0 commit comments

Comments
 (0)