From b2080d85464ed38b4aae140b4ab3028c7e7256a0 Mon Sep 17 00:00:00 2001 From: Jubal Mabaquiao Date: Thu, 15 Feb 2024 15:12:36 +0800 Subject: [PATCH] update github workflow docker publish strategy --- .github/workflows/ipfs-deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ipfs-deploy.yml b/.github/workflows/ipfs-deploy.yml index 13d8672a..c527886b 100644 --- a/.github/workflows/ipfs-deploy.yml +++ b/.github/workflows/ipfs-deploy.yml @@ -29,7 +29,7 @@ jobs: - name: Build image run: | - docker build --target self-host . --file Dockerfile --tag $IMAGE_TAG + docker build --file Dockerfile --tag $IMAGE_TAG # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry @@ -57,3 +57,11 @@ jobs: docker tag $IMAGE_TAG $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION + + # Make image reference available to subsequent steps + echo "IMAGE_RELEASE_ID=$(echo $IMAGE_ID:$VERSION)" >> $GITHUB_ENV + + # Run docker image script to publish app to nft.storage + - name: Publish to nft.storage + run: | + docker run -e NFTSTORAGE_API_KEY=${{ secrets.NFTSTORAGE_API_KEY }} $IMAGE_RELEASE_ID nft.storage