workflow-test/.github/workflows/test-sign.yaml
Torjus Håkestad 58b48db4d5
All checks were successful
Periodic flake update / flake-update (push) Successful in 4s
Change workflow
2024-10-08 20:29:02 +02:00

48 lines
1.4 KiB
YAML

---
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:
SSH_PRIVKEY: ${{ secrets.BOT_SSH_PRIVKEY }}
SSH_PUBKEY: ${{ secrets.BOT_SSH_PUBKEY }}
run: |
echo "$SSH_PRIVKEY" > "$RUNNER_TEMP/id_ed25519"
echo "$SSH_PUBKEY" > "$RUNNER_TEMP/id_ed25519.pub"
echo "$RUNNER_TEMP"
chmod -R 0600 "$RUNNER_TEMP/id_ed25519.pub" "$RUNNER_TEMP/id_ed25519"
git config --global user.name 'torjus-bot'
git config --global user.email 'torjus-bot@git.t-juice.club'
git config --global user.signingKey "$RUNNER_TEMP/id_ed25519.pub"
git config --global gpg.format ssh
git config --global commit.gpgsign true
ls $RUNNER_TEMP
- name: cat config
run: |
cat ~/.gitconfig
ls $RUNNER_TEMP
- name: add something to a file
run: echo $RANDOM >> random.txt
- name: push
run: |
cat $RUNNER_TEMP/id_ed25519.pub
ls $RUNNER_TEMP
git add random.txt
git commit -m "LOL"
git push