Skip to content

Commit 4426c21

Browse files
authored
Update docker-release.yml
1 parent b26c65c commit 4426c21

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/docker-release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v3
16+
- name: Get release tag
17+
uses: olegtarasov/get-tag@v2.1
18+
id: tagName
19+
with:
20+
tagRegex: "(.*)"
21+
tagRegexGroup: 1
1622
- name: Docker build cache
1723
uses: satackey/action-docker-layer-caching@v0.0.11
1824
continue-on-error: true
@@ -28,14 +34,14 @@ jobs:
2834
- name: Copy .env.sample to .env
2935
run: cp .env.sample .env
3036
- name: For php8.1
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
37+
run: PHP_VERSION=8.1 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.1 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push
3238
- name: For php8.0
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
39+
run: PHP_VERSION=8.0 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push
3440
- name: For php7.4
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
41+
run: PHP_VERSION=7.4 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.4 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push
3642
- name: For php7.3
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
43+
run: PHP_VERSION=7.3 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.3 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push
3844
- name: For php7.2
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
45+
run: PHP_VERSION=7.2 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.2 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push
4046
- name: For php7.1
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
47+
run: PHP_VERSION=7.1 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.1 DOCKER_TAG=$GIT_TAG_NAME docker-compose -f docker-compose-publish.yml push

0 commit comments

Comments
 (0)