From 7b24acf99419ff3b9a201e69ef8f3c2d96d94254 Mon Sep 17 00:00:00 2001 From: Christoph Kepler Date: Thu, 28 Oct 2021 17:09:17 +0200 Subject: [PATCH] Add build time to package.json in workflow Use gerred/actions/current-time to get ISO8061 timestamp and replace releaseDate in package.json --- .github/workflows/docker.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 227439ce..1affe83e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -70,11 +70,16 @@ jobs: tags: | type=sha,prefix= + - name: Get build time + uses: gerred/actions/current-time@master + id: build_time + - name: Rewrite entries in package.json to repository uses: microsoft/variable-substitution@v1 with: files: "package.json" env: + releaseDate: ${{ steps.build_time.outputs.time }} repository.url: "git+${{ github.server_url }}/${{ github.repository }}.git" bugs.url: "${{ github.server_url }}/${{ github.repository }}/issues" homepage: "${{ github.server_url }}/${{ github.repository }}#readme"