Skip to content
calendar

GitHub Action

Datetime of Workflow

v1.0.2 Latest version

Datetime of Workflow

calendar

Datetime of Workflow

Allows you show the datetime of workflow on your GitHub profile or project's README

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Datetime of Workflow

uses: ZekeriyaAY/[email protected]

Learn more about this action in ZekeriyaAY/workflow-datetime

Choose a version

πŸ“† Datetime of Workflow
GitHub License GitHub Workflow Status

πŸ’« Last Update: Β  Tue 06 Sep 2022 12:37:33 UTC

preview

πŸ“ How to use

  1. Star this repo πŸ˜‰
  2. Go to your repository
  3. Add the following tag to your README.md file, you can give whatever title you want. Just make sure that you use <!-- DEFAULT-TAG:START --> <!-- DEFAULT-TAG:END --> in your readme. The workflow will replace this comment with the datetime of workflow:
    # πŸ’« Last Update
    <!-- DEFAULT-TAG:START -->
    <!-- DEFAULT-TAG:END -->
  4. Create a folder named .github and create a workflows folder inside it, if it doesn't exist.
  5. Create a new file named workflow-datetime.yml with the following contents inside the workflows folder:
    name: Datetime of Workflow
    on:
      push:
        branches:
          - main
        workflow_dispatch:
    jobs:
      workflow-date:
        name: Update the datetime of workflow in the README
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@v3
    
          - name: Update with Datetime of Workflow
            uses: ZekeriyaAY/workflow-date@main
            with:
              github_token: ${{ secrets.GITHUB_TOKEN }}
              # date_format: '%a  %d %b %Y  %H:%M:%S%Z'
              # timezone: 'UTC'
              # tag: 'DEFAULT-TAG'
              # markdown_path: './README.md'
              # commit_branch: 'main'
              # commit_username: 'github-actions[bot]'
              # commit_email: 'github-actions[bot]@users.noreply.github.com'
              # commit_message: 'πŸš€ Datetime of Workflow Updated'
  6. Update the above input parameters with your own information. See options for a list of input parameters.
  7. Commit and wait for it to run automatically or you can also trigger it manually to see the result instantly.

πŸ”§ Options

This workflow has additional options that you can use to customize it for your use case. The following are the list of options available:

Option Default Value Description Required
github_token - Token for the repo. Can be passed in using ${{ secrets.GITHUB_TOKEN }} Yes
date_format %a %d %b %Y %H:%M:%S %Z Allows you to change the format of the date or time displayed No
timezone UTC Timezone Region No
tag DEFAULT-TAG The name of the tag to be updated in the Markdown No
markdown_path ./README.md Path to Markdown file No
commit_branch main Destination branch to push changes No
commit_username github-actions[bot] Username of the user to commit No
commit_email github-actions[bot]@users.noreply.github.com Email of the user to commit No
commit_message πŸš€ Datetime of Workflow Updated Commit message No

πŸš€ Examples

🚧 Contributing

Please see CONTRIBUTING.md for getting started with the contribution.

Make sure that you follow CODE_OF_CONDUCT.md while contributing and engaging in the discussions.

When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change.

πŸ› Bugs

If you are experiencing any bugs, don’t forget to open a new issue.