File tree Expand file tree Collapse file tree 1 file changed +39
-2
lines changed
Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Original file line number Diff line number Diff line change 66 workflow_dispatch :
77
88jobs :
9- run :
9+ update-automation :
10+ name : Run Automation Tasks
1011 runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
1114 steps :
12- - run : echo "Scheduled job to run automation tasks"
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ submodules : true
19+
20+ - name : Check if update needed
21+ run : |
22+ cd third-party-src
23+ git fetch --tags
24+ CURRENT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null | head -1 || echo "")
25+ cd ..
26+
27+ LATEST_TAG=$(curl -L \
28+ -H "Accept: application/vnd.github+json" \
29+ -H "X-GitHub-Api-Version: 2022-11-28" \
30+ https://api.github.com/repos/microsoft/vscode/releases/latest | jq -r '.tag_name')
31+
32+ echo "Current tag: $CURRENT_TAG"
33+ echo "Latest tag: $LATEST_TAG"
34+
35+ if [ "$CURRENT_TAG" = "$LATEST_TAG" ]; then
36+ echo "Submodule is up to date with latest VS Code release"
37+ exit 0
38+ else
39+ echo "Update needed: $CURRENT_TAG -> $LATEST_TAG"
40+
41+ # Create staging branch
42+ STAGING_BRANCH="staging-code-editor-$LATEST_TAG"
43+ echo "Creating staging branch: $STAGING_BRANCH"
44+
45+ git checkout -b "$STAGING_BRANCH"
46+ git push origin "$STAGING_BRANCH"
47+
48+ echo "Created staging branch: $STAGING_BRANCH"
49+ fi
You can’t perform that action at this time.
0 commit comments