Skip to content

Commit

Permalink
Merge pull request #20 from storyprotocol/feat/refactor_timestamp_wor…
Browse files Browse the repository at this point in the history
…kflow

[refactor] reusable timestamp workflow
  • Loading branch information
AndyBoWu authored Apr 16, 2024
2 parents 549b432 + 2d4f29d commit a119c14
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 a119c14

Please sign in to comment.