Add active keeper.

This commit is contained in:
Llewellyn van der Merwe 2021-07-07 21:34:47 +02:00
parent ad6f063bab
commit fbaf896f8c
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
2 changed files with 43 additions and 0 deletions

30
.github/workflows/keep-active.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: "Keep the witnesses repository active!"
on:
# run Thursday at 02:23 every week
schedule:
- cron: '23 2 * * THU'
# so we can manually update
workflow_dispatch:
jobs:
build:
runs-on: [ubuntu-20.04]
steps:
- name: Setup gitHub User Details
env:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
GPG_USER: ${{ secrets.GPG_USER }}
GPG_KEY: ${{ secrets.GPG_KEY }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PUB: ${{ secrets.SSH_PUB }}
run: |
/bin/bash <(/bin/curl -s https://raw.githubusercontent.com/vdm-io/github-user/master/src/setup.sh) --gpg-key "$GPG_KEY" --gpg-user "$GPG_USER" --ssh-key "$SSH_KEY" --ssh-pub "$SSH_PUB" --git-user "$GIT_USER" --git-email "$GIT_EMAIL"
- name: Clone Master Repository
run: |
/bin/git clone git@github.com:trueChristian/witnesses.git witnesses
- name: Set Active
run: |
cd witnesses
/bin/bash ./src/active.sh

13
src/active.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
#██████████████████████████████████████████████████████████████ DATE TODAY ███
# must set the time to Namibian :)
TODAY=$(TZ="Africa/Windhoek" date '+%A %d-%B, %Y')
echo "${TODAY}" > .active
git add .
git commit -am"active on ${TODAY}"
git push
exit 0