Release action fixed

This commit is contained in:
Paramtamtam 2021-03-04 11:37:03 +05:00
parent 7957d16c0f
commit a55ec08eef
No known key found for this signature in database
GPG Key ID: 366371698FAD0A2B

View File

@ -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"