Skip to content

Trigger Daily Contribution #5

Trigger Daily Contribution

Trigger Daily Contribution #5

name: Create Contribution
#on:
on:
issue_comment:
types: [created]
workflow_dispatch:
jobs:
build-version:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: git
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git --version
git config user.name "chirbard"
git config user.email "[email protected]"
git switch archive
git switch main
formatted_date=$(date -I)
echo $formatted_date
git restore --source archive -- "${formatted_date}/"
git add --all
git commit -m "daily commit ${formatted_date}"
git push