diff --git a/.github/workflows/docker-buildx-dev.yml b/.github/workflows/docker-buildx-dev.yml index 3ab1e027..16c48c6d 100644 --- a/.github/workflows/docker-buildx-dev.yml +++ b/.github/workflows/docker-buildx-dev.yml @@ -1,4 +1,4 @@ -name: Build dev and Push Docker image dev and dev_alpine to Docker Hub with buildx +name: Build dev and Push Docker image dev, dev_alpine and dev_shelly to Docker Hub with buildx on: push: @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: '20.x' - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -33,6 +33,16 @@ jobs: with: version: latest + - name: Extract version from package.json + id: extract_version + run: | + VERSION=$(jq -r '.version' package.json) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Echo main version ${{ env.VERSION }} + run: | + echo "Extracted version is: $VERSION ${{ env.VERSION }}" + - name: Run Docker Buildx on dev_shelly run: | docker buildx build \ diff --git a/.github/workflows/docker-buildx-main.yml b/.github/workflows/docker-buildx-main.yml index ba2442f0..17f9e564 100644 --- a/.github/workflows/docker-buildx-main.yml +++ b/.github/workflows/docker-buildx-main.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: '20.x' - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -33,6 +33,16 @@ jobs: with: version: latest + - name: Extract version from package.json + id: extract_version + run: | + VERSION=$(jq -r '.version' package.json) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Echo main version ${{ env.VERSION }} + run: | + echo "Extracted version is: $VERSION ${{ env.VERSION }}" + - name: Run Docker Buildx on latest run: | docker buildx build \