-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): fix bugs with update backporting, add weekly mode, remove f…
…39, add el10 (#2610)
- Loading branch information
Showing
7 changed files
with
131 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Update per branch | ||
on: | ||
schedule: | ||
- cron: "*/30 * * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
autoupdate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
branch: | ||
- frawhide | ||
- f40 | ||
- f41 | ||
- el10 | ||
container: | ||
image: ghcr.io/terrapkg/builder:frawhide | ||
options: --cap-add=SYS_ADMIN --privileged | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.branch }} | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} | ||
|
||
- name: Install SSH signing key & Set up git repository | ||
run: | | ||
mkdir -p ${{ runner.temp }} | ||
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key | ||
chmod 0700 ${{ runner.temp }}/signing_key | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Run Update | ||
run: | | ||
nbranch="${{ matrix.branch }}" | ||
[ "$nbranch" = 'frawhide' ] && nbranch='f42' | ||
anda update -vv --filters updbranch=1 --labels branch=${{ matrix.branch }},nbranch=$nbranch | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUST_BACKTRACE: full | ||
|
||
- name: Save | ||
run: | | ||
if [[ `git status --porcelain` ]]; then | ||
git config user.name "Raboneko" | ||
git config user.email "[email protected]" | ||
git config gpg.format "ssh" | ||
git config user.signingkey "${{ runner.temp }}/signing_key" | ||
msg="bump(branch): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" | ||
git commit -S -a -m "$msg" | ||
git push -u origin --all | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
autoupdate: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/terrapkg/builder:f40 | ||
image: ghcr.io/terrapkg/builder:frawhide | ||
options: --cap-add=SYS_ADMIN --privileged | ||
steps: | ||
- name: Checkout | ||
|
@@ -17,37 +17,37 @@ jobs: | |
fetch-depth: 0 | ||
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} | ||
|
||
- name: Install SSH signing key | ||
- name: Install SSH signing key & Set up git repository | ||
run: | | ||
mkdir -p ${{ runner.temp }} | ||
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key | ||
chmod 0700 ${{ runner.temp }}/signing_key | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Run Nightly Update | ||
run: anda update -vv --filters nightly=1 | ||
run: anda update -v --filters nightly=1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUST_BACKTRACE: full | ||
|
||
- name: Save | ||
run: | | ||
git config --global --add safe.directory "*" | ||
if [[ `git status --porcelain` ]]; then | ||
git config user.name "Raboneko" | ||
git config user.email "[email protected]" | ||
git config gpg.format "ssh" | ||
git config user.signingkey "${{ runner.temp }}/signing_key" | ||
msg="bump(nightly): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" | ||
git commit -S -a -m "$msg" | ||
git format-patch HEAD^ | ||
copy_over () { | ||
git format-patch HEAD^ | ||
git checkout $1 | ||
git apply *.patch || true | ||
rm *.patch | ||
git add * | ||
git add anda | ||
git commit -S -a -m "$msg" | ||
} | ||
copy_over f37 || true | ||
copy_over f38 || true | ||
copy_over frawhide || true | ||
copy_over f40 || true | ||
copy_over f41 || true | ||
copy_over el10 || true | ||
git push -u origin --all | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Weekly Update | ||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
autoupdate: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/terrapkg/builder:frawhide | ||
options: --cap-add=SYS_ADMIN --privileged | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} | ||
|
||
- name: Install SSH signing key & Set up git repository | ||
run: | | ||
mkdir -p ${{ runner.temp }} | ||
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key | ||
chmod 0700 ${{ runner.temp }}/signing_key | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Run Weekly Update | ||
run: anda update -v --filters weekly=1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUST_BACKTRACE: full | ||
|
||
- name: Save | ||
run: | | ||
if [[ `git status --porcelain` ]]; then | ||
git config user.name "Raboneko" | ||
git config user.email "[email protected]" | ||
git config gpg.format "ssh" | ||
git config user.signingkey "${{ runner.temp }}/signing_key" | ||
msg="bump(weekly): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" | ||
git commit -S -a -m "$msg" | ||
git format-patch HEAD^ | ||
copy_over () { | ||
git checkout $1 | ||
git apply *.patch || true | ||
git add anda | ||
git commit -S -a -m "$msg" | ||
} | ||
copy_over f40 || true | ||
copy_over f41 || true | ||
copy_over el10 || true | ||
git push -u origin --all | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
autoupdate: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/terrapkg/builder:f40 | ||
image: ghcr.io/terrapkg/builder:frawhide | ||
options: --cap-add=SYS_ADMIN --privileged | ||
steps: | ||
- name: Checkout | ||
|
@@ -17,39 +17,37 @@ jobs: | |
fetch-depth: 0 | ||
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} | ||
|
||
- name: Install SSH signing key | ||
- name: Install SSH signing key & Set up git repository | ||
run: | | ||
mkdir -p ${{ runner.temp }} | ||
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key | ||
chmod 0700 ${{ runner.temp }}/signing_key | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Run Update | ||
run: anda update -vv | ||
run: anda update -v --excludes nightly=1 --excludes weekly=1 --excludes updbranch=1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.AUTOUPDATE_GH_TOKEN }} | ||
RUST_BACKTRACE: full | ||
|
||
- name: Save | ||
run: | | ||
git config --global --add safe.directory "*" | ||
if [[ `git status --porcelain` ]]; then | ||
git config user.name "Raboneko" | ||
git config user.email "[email protected]" | ||
git config gpg.format "ssh" | ||
git config user.signingkey "${{ runner.temp }}/signing_key" | ||
msg="bump: $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" | ||
git commit -S -a -m "$msg" | ||
git format-patch HEAD^ | ||
copy_over () { | ||
git format-patch HEAD^ | ||
git checkout $1 | ||
git apply *.patch || true | ||
rm *.patch | ||
git add * | ||
git add anda | ||
git commit -S -a -m "$msg" | ||
} | ||
copy_over f39 || true | ||
copy_over f37 || true | ||
copy_over f38 || true | ||
copy_over frawhide || true | ||
copy_over f40 || true | ||
copy_over f41 || true | ||
copy_over el10 || true | ||
git push -u origin --all | ||
fi |