Skip to content

Commit

Permalink
Release action fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramtamtam committed Mar 4, 2021
1 parent 7957d16 commit a55ec08
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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"

0 comments on commit a55ec08

Please sign in to comment.