From 4fd4be94d06147e5e4cea5d28a9cfe613cbf04be Mon Sep 17 00:00:00 2001 From: okuzawats Date: Mon, 1 Jul 2024 10:00:08 +0900 Subject: [PATCH 1/2] fix a bug : datetime become empty --- .github/workflows/development.yml | 2 +- .github/workflows/example.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index f2334f9..90fffdd 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -14,7 +14,7 @@ jobs: env: TZ: "Asia/Tokyo" run: | - echo "CURRENT_DATETIME=$(date + "%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV + echo "CURRENT_DATETIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV - name: "set arguments" id: "arguments" run: | diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 580ba7b..978daa7 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -14,7 +14,7 @@ jobs: env: TZ: "Asia/Tokyo" run: | - echo "CURRENT_DATETIME=$(date + "%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV + echo "CURRENT_DATETIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV - name: "set arguments" id: "arguments" run: | From 06924038c0ef3afef34a43325a86fdddf1ad94df Mon Sep 17 00:00:00 2001 From: okuzawats Date: Mon, 1 Jul 2024 10:02:53 +0900 Subject: [PATCH 2/2] add comment --- .github/workflows/development.yml | 2 +- .github/workflows/example.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 90fffdd..af6b384 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -13,7 +13,7 @@ jobs: - name: "set current datetime" env: TZ: "Asia/Tokyo" - run: | + run: | # do not remove the space after `date +`. you need this. echo "CURRENT_DATETIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV - name: "set arguments" id: "arguments" diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 978daa7..0db45d6 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -13,7 +13,7 @@ jobs: - name: "set current datetime" env: TZ: "Asia/Tokyo" - run: | + run: | # do not remove the space after `date +`. you need this. echo "CURRENT_DATETIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV - name: "set arguments" id: "arguments"