Skip to content

Commit 01dba9c

Browse files
committed
Add one-shot copy workflow for AE6E66 and contacts data
1 parent 38d1eea commit 01dba9c

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Copy AE6E66 and contacts data
2+
3+
on:
4+
push:
5+
paths:
6+
- .github/workflows/copy-ae6e66-and-contacts.yml
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
copy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout destination repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
persist-credentials: true
20+
21+
- name: Copy AE6E66 and contacts data exactly
22+
shell: bash
23+
run: |
24+
set -euo pipefail
25+
tmp="$(mktemp -d)"
26+
trap 'rm -rf "$tmp"' EXIT
27+
git clone --depth 1 --branch main https://github.com/mearvk/Java.Web.Server.Telnet.Front.Java.21.git "$tmp/source"
28+
mkdir -p modules
29+
rm -rf modules/AE6E66
30+
cp -a "$tmp/source/modules/AE6E66" modules/AE6E66
31+
rm -rf contacts
32+
cp -a "$tmp/source/contacts" contacts
33+
34+
- name: Commit copied data and remove one-shot workflow
35+
shell: bash
36+
run: |
37+
set -euo pipefail
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
git rm -f .github/workflows/copy-ae6e66-and-contacts.yml
41+
git add modules/AE6E66 contacts
42+
git diff --cached --quiet && { echo "No changes to copy."; exit 0; }
43+
git commit -m "Copy AE6E66 module and contacts data"
44+
git push

0 commit comments

Comments
 (0)