Nightly Update #339
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
name: Nightly Update | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
autoupdate: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/terrapkg/builder:f38 | |
options: --cap-add=SYS_ADMIN --privileged | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} | |
- name: Install SSH signing key | |
run: | | |
mkdir -p ${{ runner.temp }} | |
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key | |
chmod 0700 ${{ runner.temp }}/signing_key | |
- name: Run Nightly Update | |
run: anda update -vv --filters nightly=1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- 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" | |
f37 () { | |
git format-patch HEAD^ | |
git checkout f37 | |
git apply *.patch || true | |
git add * | |
git commit -S -a -m "$msg" | |
} | |
f37 || true | |
git push -u origin --all | |
fi |