Skip to content

Commit 29c9c88

Browse files
committed
Add workflow to sync+PR SIPs from SIP repository
1 parent ff52064 commit 29c9c88

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/sync-sips.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Sync SIPs
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *' # Daily at 6 AM UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Fetch SIPs from improvement-proposals
15+
run: |
16+
rm -rf _sips/sips
17+
mkdir -p _sips/sips
18+
git clone --depth 1 --filter=blob:none --sparse https://github.com/scala/improvement-proposals.git /tmp/improvement-proposals
19+
cd /tmp/improvement-proposals
20+
git sparse-checkout set content
21+
cp -r content/* $GITHUB_WORKSPACE/_sips/sips/
22+
23+
- name: Check for changes
24+
id: changes
25+
run: |
26+
git add _sips/sips
27+
if git diff --staged --quiet; then
28+
echo "changed=false" >> $GITHUB_OUTPUT
29+
else
30+
echo "changed=true" >> $GITHUB_OUTPUT
31+
fi
32+
33+
- name: Create Pull Request
34+
if: steps.changes.outputs.changed == 'true'
35+
uses: peter-evans/create-pull-request@v5
36+
with:
37+
commit-message: "Sync SIPs from scala/improvement-proposals"
38+
title: "Sync SIPs from scala/improvement-proposals"
39+
body: |
40+
Automated sync of SIP content from [scala/improvement-proposals](https://github.com/scala/improvement-proposals).
41+
branch: sync-sips
42+
delete-branch: true

0 commit comments

Comments
 (0)