-
Notifications
You must be signed in to change notification settings - Fork 516
36 lines (31 loc) · 1.24 KB
/
update-single-platform-branches.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Update single-platform release tests branches
on:
# allow triggering this action manually
workflow_dispatch:
# run every saturday (at noon UTC), so the builds occur during the weekend during lower CI load
schedule:
- cron: '0 12 * * 6'
jobs:
updateSinglePlatformBranches:
name: Merge main into single-platform release test branches
runs-on: ubuntu-latest
# GITHUB_TOKEN change from read-write to read-only on 2024-02-01 requires permissions block
# https://docs.opensource.microsoft.com/github/apps/permission-changes/
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Update branches'
run: |
set -ex
git config user.email "[email protected]"
git config user.name "GitHub Actions Single Platform Branch Updater"
for platform in dotnet-iOS dotnet-tvOS dotnet-MacCatalyst dotnet-macOS; do
git checkout -b release-test/only-$platform origin/release-test/only-$platform
git merge origin/main
git push
done