From 83c6311e1d17cb10f4d99cd9fba9be877e9cd3dd Mon Sep 17 00:00:00 2001 From: Siddharth More Date: Wed, 24 Apr 2024 16:30:17 -0700 Subject: [PATCH] Fix PR comment --- .../workflows/docker-publish-opr-node-images.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish-opr-node-images.yaml b/.github/workflows/docker-publish-opr-node-images.yaml index 7156ab892c..ed3aed9cc5 100644 --- a/.github/workflows/docker-publish-opr-node-images.yaml +++ b/.github/workflows/docker-publish-opr-node-images.yaml @@ -9,12 +9,9 @@ on: version: description: 'Version (Required)' required: true - gitCommit: + gitcommit: description: 'GitCommit (Required)' required: true - gitDate: - description: 'GitDate (Required)' - required: true release_tag: description: 'Release Tag (Optional)' required: false @@ -36,6 +33,12 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.commit_sha }} + - name: Get Commit Date + id: get_date + run: | + GIT_DATE=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${{ github.event.inputs.gitcommit }} || date '+%Y-%m-%d') + echo "GIT_DATE=$GIT_DATE" >> $GITHUB_ENV + echo "::set-output name=gitDate::$GIT_DATE" - name: Setup Buildx uses: docker/setup-buildx-action@v1 @@ -73,7 +76,7 @@ jobs: tags: ${{ env.REGISTRY }}/layr-labs/eigenda/opr-node:${{ steps.set_tag.outputs.tag }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new - build-args: SEMVER=${{ github.event.inputs.version }},GITCOMMIT=${{ github.event.inputs.gitcommit }},DATE=${{ github.event.inputs.GitDate }} + build-args: SEMVER=${{ github.event.inputs.version }},GITCOMMIT=${{ github.event.inputs.gitcommit }},GITDATE=${{ steps.get_date.outputs.gitDate }} if: ${{ success() }} - name: Build and Push NodePlugin Image