From b615f3d52dee4c32120d99dd9aac4829070367d1 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Fri, 21 Feb 2025 11:48:35 +1300 Subject: [PATCH] Tag docker with version --- .github/workflows/prod-web.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prod-web.yml b/.github/workflows/prod-web.yml index 63a313ed..831959ab 100644 --- a/.github/workflows/prod-web.yml +++ b/.github/workflows/prod-web.yml @@ -23,10 +23,17 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract version from package.json + id: extract_version + run: | + VERSION=$(jq -r .version ./materialious/package.json) + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Build and push uses: docker/build-push-action@v5 with: context: ./materialious platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: wardpearce/materialious:latest + tags: | + wardpearce/materialious:latest + wardpearce/materialious:${{ steps.extract_version.outputs.version }} \ No newline at end of file