Skip to content

Commit 4361db0

Browse files
committed
ci: sync output to starter repo
1 parent 93284bc commit 4361db0

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/sync-starter.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sync Starter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: sync-starter
10+
cancel-in-progress: true
11+
12+
jobs:
13+
sync-starter:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout starter repo
17+
uses: actions/checkout@v6
18+
with:
19+
repository: graycoreio/magento2-devcontainer-starter
20+
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
21+
submodules: true
22+
23+
- name: Update submodule
24+
working-directory: .devcontainer/magento2-devcontainer
25+
run: |
26+
git fetch origin main
27+
git checkout origin/main
28+
29+
- name: Remove existing generated files
30+
working-directory: .devcontainer
31+
run: |
32+
find . -maxdepth 1 -not -name 'magento2-devcontainer' -not -name '.' -exec rm -rf {} +
33+
34+
- name: Run init.sh
35+
run: |
36+
printf '\n\n' | .devcontainer/magento2-devcontainer/bin/init.sh
37+
38+
- name: Commit and push
39+
env:
40+
GRAYBOT_GPG_KEY: ${{ secrets.GRAYBOT_GPG_KEY }}
41+
run: |
42+
echo "$GRAYBOT_GPG_KEY" | gpg --batch --import
43+
export GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d/ -f2)
44+
45+
git config --global user.signingkey $GPG_KEY_ID
46+
git config --global commit.gpgSign true
47+
git config --global user.email "automation@graycore.io"
48+
git config --global user.name "Beep Boop"
49+
git add -A
50+
if ! git diff --staged --quiet; then
51+
git commit -m "chore: sync devcontainer ${GITHUB_SHA::7}"
52+
git push
53+
fi

0 commit comments

Comments
 (0)