diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55ed50f..6517239 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,9 +17,6 @@ jobs: with: node-version: 12 - - name: Generate version value - run: echo "::set-env name=PACKAGE_VERSION::${GITHUB_REF##*/v}" - - uses: actions/cache@v2 with: path: '**/node_modules' @@ -74,17 +71,18 @@ jobs: with: fetch-depth: 1 - - name: Generate image tag value - run: echo "::set-env name=IMAGE_TAG::${GITHUB_REF##*/[vV]}" # `/refs/tags/v1.2.3` -> `1.2.3` + - name: Generate builder values + id: values + run: echo "::set-output name=version::${GITHUB_REF##*/[vV]}" # `/refs/tags/v1.2.3` -> `1.2.3` - name: Make docker login run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin &> /dev/null - name: Build image - run: docker build --tag "tarampampam/error-pages:${IMAGE_TAG}" --tag "tarampampam/error-pages:latest" -f ./Dockerfile . + run: docker build --tag "tarampampam/error-pages:${{ steps.values.outputs.version }}" --tag "tarampampam/error-pages:latest" -f ./Dockerfile . - name: Push version image - run: docker push "tarampampam/error-pages:${IMAGE_TAG}" + run: docker push "tarampampam/error-pages:${{ steps.values.outputs.version }}" - name: Push latest image run: docker push "tarampampam/error-pages:latest"