Last active
May 27, 2022 15:28
-
-
Save MichaelDimmitt/30a7de7d62d6eeda7369e8121e1d146e to your computer and use it in GitHub Desktop.
github action to add current date to a temp file with current date as commit message.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: adds todays date to master branch at 7am eastern time, 11am utc | |
on: | |
schedule: | |
- cron: "0 11 * * *" | |
# on: | |
# push: | |
# branches: | |
# - master | |
jobs: | |
daily-commit: | |
name: Commit current date | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S')" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
fetch-depth: 0 # To get all tags | |
- name: Write a line to a file | |
run: echo ${{ steps.date.outputs.date }} >> temp.txt | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: ${{ steps.date.outputs.date }} | |
commit_options: "--no-verify --signoff --allow-empty" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment