From 20b8ecb744e2e3020f1d93e60afc16b7ef092744 Mon Sep 17 00:00:00 2001 From: June <38109440+DevopsGoth@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:31:49 -0700 Subject: [PATCH] Add output of dockerhub sha --- .github/workflows/dockerhub_release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerhub_release.yml b/.github/workflows/dockerhub_release.yml index b2d279b..8105efa 100644 --- a/.github/workflows/dockerhub_release.yml +++ b/.github/workflows/dockerhub_release.yml @@ -41,6 +41,8 @@ on: jobs: Build-Push: runs-on: ubuntu-latest + outputs: + DOCKERHUB_SHA: ${{ steps.validate-sha.outputs.DOCKERHUB_SHA }} steps: - uses: actions/checkout@v3 with: @@ -59,7 +61,7 @@ jobs: - name: Update GHC version if needed run: | - if [[ ! -z ${{ inputs.GHC_VERSION }} ]] + if [[ ! -z ${{ inputs.GHC_VERSION }} ]]; then sed -i -e "s/ARG GHCVER=.*/ARG GHCVER=${{ inputs.GHC_VERSION }}/" Dockerfile fi - name: Build and push ubuntu image @@ -86,6 +88,7 @@ jobs: git push origin chainweb-${{ inputs.VERSION_NEW }} - name: Validate SHAs + id: validate-sha run: | ## spit these to output digest1=$(docker inspect kadena/chainweb-node:${{ inputs.VERSION_NEW }} --format '{{ .RepoDigests }}') @@ -94,5 +97,5 @@ jobs: echo "DOCKERHUB_SHA=sha mismatches in dockerhub image" >> $GITHUB_ENV exit 1 fi - echo "DOCKERHUB_SHA=$digest1" >> $GITHUB_ENV + echo "DOCKERHUB_SHA=$digest1" >> $GITHUB_OUTPUT echo "DOCKERHUB_SHA=$digest1"