Skip to content

Commit d24943c

Browse files
jperkingithub-actions[bot]
authored andcommitted
.github: Add workflows.
1 parent f234f5b commit d24943c

File tree

4 files changed

+159
-0
lines changed

4 files changed

+159
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Create quarterly feature branches
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
quarter:
7+
description: 'Quarterly branch (e.g. 2025Q4)'
8+
required: true
9+
10+
jobs:
11+
create-features:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
feature:
18+
- macos
19+
- miscfix
20+
- pbulk
21+
- pbulkmulti
22+
- performance
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Configure github-actions bot
30+
run: |
31+
git config user.name "github-actions[bot]"
32+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+
34+
- name: Fetch NetBSD/pkgsrc.git
35+
run: |
36+
git remote add netbsd https://github.com/NetBSD/pkgsrc.git
37+
git fetch netbsd
38+
39+
- name: Create feature/${{ matrix.feature }}/${{ inputs.quarter }}
40+
run: |
41+
git checkout -B feature/${{ matrix.feature }}/${{ inputs.quarter }} origin/feature/${{ matrix.feature }}/trunk
42+
git rebase --committer-date-is-author-date --onto netbsd/pkgsrc-${{ inputs.quarter }} netbsd/trunk
43+
44+
- name: Push feature/${{ matrix.feature }}/${{ inputs.quarter }}
45+
run: |
46+
git push --force origin feature/${{ matrix.feature }}/${{ inputs.quarter }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Rebase feature branches against NetBSD
2+
3+
on:
4+
schedule:
5+
- cron: "17 * * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
rebase:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
branch:
16+
- feature/macos/trunk
17+
- feature/miscfix/trunk
18+
- feature/pbulk/trunk
19+
- feature/pbulkmulti/trunk
20+
- feature/performance/trunk
21+
- trunk
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Configure github-actions bot
29+
run: |
30+
git config user.name "github-actions[bot]"
31+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32+
33+
- name: Fetch NetBSD/pkgsrc.git
34+
run: |
35+
git remote add netbsd https://github.com/NetBSD/pkgsrc.git
36+
git fetch netbsd
37+
38+
- name: Rebase ${{ matrix.branch }}
39+
run: |
40+
git checkout ${{ matrix.branch }}
41+
git rebase --committer-date-is-author-date netbsd/trunk
42+
43+
- name: Push ${{ matrix.branch }}
44+
run: |
45+
git push --force origin ${{ matrix.branch }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Rebase illumos branch
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
rebase:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
submodules: true
12+
- name: Configure github-actions bot
13+
run: |
14+
git config user.name "github-actions[bot]"
15+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
16+
- name: Rebase release/trunk
17+
run: |
18+
git checkout release/trunk
19+
git submodule update --init --recursive
20+
git submodule foreach '
21+
git fetch --all
22+
main=$(git remote show origin | awk "/HEAD branch/ {print \$NF}")
23+
git checkout $main
24+
git pull
25+
'
26+
git reset --hard origin/feature/miscfix/trunk
27+
for feature in pbulk pbulkmulti performance; do
28+
git merge --no-edit origin/feature/${feature}/trunk
29+
done
30+
git submodule add https://github.com/TritonDataCenter/pkgsrc-extra.git extra
31+
git submodule add https://github.com/TritonDataCenter/pkgsrc-joyent.git joyent
32+
git submodule add https://github.com/TritonDataCenter/pkgsrc-wip.git wip
33+
git add .gitmodules
34+
git commit -m "Add submodules."
35+
git push --force origin release/trunk

.github/workflows/rebase-macos.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Rebase macOS branch
2+
on:
3+
schedule:
4+
- cron: "47 * * * *"
5+
workflow_dispatch:
6+
jobs:
7+
rebase:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
submodules: true
14+
- name: Configure github-actions bot
15+
run: |
16+
git config user.name "github-actions[bot]"
17+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
18+
- name: Rebase release/trunk
19+
run: |
20+
git checkout release/macos
21+
git submodule update --init --recursive
22+
git submodule foreach '
23+
git fetch --all
24+
main=$(git remote show origin | awk "/HEAD branch/ {print \$NF}")
25+
git checkout $main
26+
git pull
27+
'
28+
git reset --hard origin/feature/macos/trunk
29+
git merge --no-edit origin/feature/performance/trunk
30+
git submodule add https://github.com/TritonDataCenter/pkgsrc-extra.git extra
31+
git add .gitmodules
32+
git commit -m "Add submodules."
33+
git push --force origin release/macos

0 commit comments

Comments
 (0)