Skip to content

Commit

Permalink
[refactor] reusable timestamp workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBoWu committed Apr 16, 2024
1 parent 549b432 commit 2d4f29d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions utility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TBA
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Reusable Workflow to print out timestamp

on:
workflow_call:
inputs:
timezone:
description: 'Timezone to use for timestamp'
required: false
type: string
default: 'America/Los_Angeles'

jobs:
timestamp:
Expand All @@ -10,7 +16,7 @@ jobs:

- name: Generate timestamp
run: |
echo "TIMESTAMP=$(TZ='America/Los_Angeles' date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
echo "TIMESTAMP=$(TZ=${{ inputs.timezone }} date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
- name: Print timestamp
run: |
Expand Down

0 comments on commit 2d4f29d

Please sign in to comment.