Skip to content

Commit b26c65c

Browse files
authored
Update docker-release.yml
1 parent 7be3e76 commit b26c65c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/docker-release.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v3
16-
- name: Set env
17-
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
1816
- name: Docker build cache
1917
uses: satackey/action-docker-layer-caching@v0.0.11
2018
continue-on-error: true
@@ -30,14 +28,14 @@ jobs:
3028
- name: Copy .env.sample to .env
3129
run: cp .env.sample .env
3230
- name: For php8.1
33-
run: PHP_VERSION=8.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
31+
run: PHP_VERSION=8.1 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.1 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push
3432
- name: For php8.0
35-
run: PHP_VERSION=8.0 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
33+
run: PHP_VERSION=8.0 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push
3634
- name: For php7.4
37-
run: PHP_VERSION=7.4 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.4 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
35+
run: PHP_VERSION=7.4 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.4 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push
3836
- name: For php7.3
39-
run: PHP_VERSION=7.3 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.3 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
37+
run: PHP_VERSION=7.3 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.3 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push
4038
- name: For php7.2
41-
run: PHP_VERSION=7.2 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.2 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
39+
run: PHP_VERSION=7.2 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.2 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push
4240
- name: For php7.1
43-
run: PHP_VERSION=7.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
41+
run: PHP_VERSION=7.1 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.1 DOCKER_TAG=${{ github.event.release.tag_name }} docker-compose -f docker-compose-publish.yml push

0 commit comments

Comments
 (0)