Q8: GitHub Actions YAML Generator
Generate a GitHub Actions workflow YAML file with your email
1
Step-by-Step InstructionsCreate a New GitHub Repository
- Go to https://github.com/new (Sign in to GitHub if needed)
- Enter a name for your repository (e.g.,
daily-commit-workflow) - Make sure "Public" is selected
- Check the box that says "Add a README file"
- Click the green "Create repository" button at the bottom
2
Enter Your Email3
Generated YAMLname: Daily Commit
on:
schedule:
- cron: '15 4 * * *'
workflow_dispatch:
jobs:
commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }} # ✅ allows push access
- name: Commit step - {{email}}
run: |
echo "TDSFU Daily run: $(date -u) TDSFU" >> daily-log.txt
- name: Git Commit and Push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add daily-log.txt
git commit -m "Auto commit at $(date -u)" || echo "No changes to commit"
git push