2024-10-08 18:01:03 +00:00
|
|
|
---
|
|
|
|
name: Periodic flake update
|
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
push:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 */2 * * *"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
flake-update:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
- name: configure git
|
|
|
|
env:
|
2024-10-08 18:29:02 +00:00
|
|
|
SSH_PRIVKEY: ${{ secrets.BOT_SSH_PRIVKEY }}
|
|
|
|
SSH_PUBKEY: ${{ secrets.BOT_SSH_PUBKEY }}
|
2024-10-08 18:01:03 +00:00
|
|
|
run: |
|
2024-10-08 18:19:05 +00:00
|
|
|
echo "$SSH_PRIVKEY" > "$RUNNER_TEMP/id_ed25519"
|
|
|
|
echo "$SSH_PUBKEY" > "$RUNNER_TEMP/id_ed25519.pub"
|
2024-10-08 18:22:15 +00:00
|
|
|
echo "$RUNNER_TEMP"
|
2024-10-08 18:19:05 +00:00
|
|
|
chmod -R 0600 "$RUNNER_TEMP/id_ed25519.pub" "$RUNNER_TEMP/id_ed25519"
|
2024-10-08 18:01:03 +00:00
|
|
|
git config --global user.name 'torjus-bot'
|
|
|
|
git config --global user.email 'torjus-bot@git.t-juice.club'
|
2024-10-08 18:19:05 +00:00
|
|
|
git config --global user.signingKey "$RUNNER_TEMP/id_ed25519.pub"
|
2024-10-08 18:01:03 +00:00
|
|
|
git config --global gpg.format ssh
|
|
|
|
git config --global commit.gpgsign true
|
2024-10-08 18:19:05 +00:00
|
|
|
ls $RUNNER_TEMP
|
2024-10-08 18:11:06 +00:00
|
|
|
- name: cat config
|
|
|
|
run: |
|
|
|
|
cat ~/.gitconfig
|
2024-10-08 18:19:05 +00:00
|
|
|
ls $RUNNER_TEMP
|
2024-10-08 18:01:03 +00:00
|
|
|
- name: add something to a file
|
2024-10-08 18:09:00 +00:00
|
|
|
run: echo $RANDOM >> random.txt
|
2024-10-08 18:01:03 +00:00
|
|
|
- name: push
|
2024-10-08 18:06:41 +00:00
|
|
|
run: |
|
2024-10-08 18:27:13 +00:00
|
|
|
cat $RUNNER_TEMP/id_ed25519.pub
|
2024-10-08 18:21:02 +00:00
|
|
|
ls $RUNNER_TEMP
|
2024-10-08 18:06:41 +00:00
|
|
|
git add random.txt
|
2024-10-08 18:09:00 +00:00
|
|
|
git commit -m "LOL"
|
2024-10-08 18:06:41 +00:00
|
|
|
git push
|