DEV: Pass `TAG` variable between workflow steps (#590)
authorDavid Taylor <david@taylorhq.com>
Mon, 13 Dec 2021 22:57:16 +0000 (22:57 +0000)
committerGitHub <noreply@github.com>
Mon, 13 Dec 2021 22:57:16 +0000 (22:57 +0000)
.github/workflows/build.yml

index 15cbc19828de1a5ba3fca8479e606f3d6c7cc5f0..d3ae5b446915e777050b92a43006f83097b657d4 100644 (file)
@@ -31,8 +31,10 @@ jobs:
         run: |
           docker run --rm -e RUBY_ONLY=1 -e USE_TURBO=1 -e SKIP_PLUGINS=1 -e SKIP_LINT=1 discourse/discourse_test:build
       - name: tag images
+        id: tag-images
         run: |
           TAG=`date +%Y%m%d-%H%M`
+          echo "::set-output name=tag::$(echo $TAG)"
           docker tag discourse/base:build discourse/base:2.0.$TAG-slim
           docker tag discourse/base:build discourse/base:slim
           docker tag discourse/base:build discourse/base:2.0.$TAG
@@ -45,6 +47,7 @@ jobs:
         env:
           DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
         run: |
+          TAG=${{ steps.tag-images.outputs.tag }}
           docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
           docker push discourse/base:2.0.$TAG-slim
           docker push discourse/base:slim