Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): update.yml and also upgrade to actions v4 #34

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set workspace as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate build matrix
Expand All @@ -44,19 +44,12 @@ jobs:
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Cache buildroot
id: br-cache
uses: actions/cache@v3
with:
path: /var/cache
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}

- name: Include custom build template instead of package default
run: |
cp -v ultramarine/ultramarine-mock-configs/ultramarine.tpl /etc/mock/templates/ultramarine.tpl
Expand All @@ -71,7 +64,7 @@ jobs:
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.art.outputs.name }}
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mass-rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git repository
Expand All @@ -70,7 +70,7 @@ jobs:
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.art.outputs.name }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-comps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
container:
image: ghcr.io/terrapkg/builder:f40
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Push to subatomic
run: |
branch=${{ github.ref_name }}
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update
on:
schedule:
- cron: "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 Update
run: anda update -vv
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: $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')"
git commit -S -a -m "$msg"
copy_over () {
git format-patch HEAD^
git checkout $1
git apply *.patch || true
rm *.patch
git add *
git commit -S -a -m "$msg"
}
copy_over f39 || true
copy_over f40 || true
git push -u origin --all
fi