Skip to content

AlgoFam Greeting

AlgoFam Greeting #628

Workflow file for this run

name: "AlgoFam Greeting"
on:
# no timezone support so cron runs in UTC time for now
schedule:
- cron: "8 15 * * *"
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
workflow_call:
jobs:
run-greeting-app:
name: "Run Greeting App"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.MICHAELTCHUANG_BOT }}
GIT_AUTHOR_NAME: michaeltchuang
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: michaeltchuang
GIT_COMMITTER_EMAIL: [email protected]
CLIKT_ADDRESS: ${{ secrets.CLIKT_ADDRESS }}
CLIKT_PASSPHRASE: ${{ secrets.CLIKT_PASSPHRASE }}
steps:
- name: "Checkout main branch"
uses: actions/checkout@v4
with:
token: ${{ secrets.MICHAELTCHUANG_BOT }}
repository: michaeltchuang/a-day-in-my-bobalife
ref: main
submodules: recursive
- name: "Import GPG Key"
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: "Install JDK 17"
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: Get current date
id: currentdate
run: |
echo "jobdate=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: "Run greeting script"
working-directory: HaveAMagicalDay
run: ./gradlew run
- name: "Commit changes"
working-directory: HaveAMagicalDay
run: |
git add .
git diff-index --quiet HEAD || git commit -m 'chore: log greeting (${{ steps.currentdate.outputs.jobdate }})'
- name: "Push updates to main branch"
run: git push origin HEAD:main