Skip to content

Commit 47f1775

Browse files
testing tag version workflow
1 parent 830440a commit 47f1775

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

.github/workflows/php84.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,3 @@ jobs:
5353
pull: true
5454
push: true
5555
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.PHP_VERSION }}
56-
57-
- name: Get the PHP version
58-
id: php_version
59-
env:
60-
PHP_VERSION: ${{ env.PHP_VERSION }}
61-
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.PHP_VERSION }}
62-
run: |
63-
php_version=$(docker run --rm --entrypoint sh ${IMAGE} -c 'php -v | head -n 1 | cut -d " " -f 2')
64-
echo "PHP_VERSION=$php_version" >> $GITHUB_STATE
65-
66-
- name: Print PHP Version
67-
run: echo "The detected PHP version is $PHP_VERSION"
68-
env:
69-
PHP_VERSION: ${{ steps.php_version.outputs.PHP_VERSION }}

.github/workflows/tag-versions.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tag actual PHP versions
2+
on:
3+
workflow_dispatch:
4+
branches: [ 8.4 ]
5+
6+
env:
7+
PHP_VERSION: 8.4
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
tag:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Get the PHP version
16+
id: php_version
17+
env:
18+
PHP_VERSION: ${{ env.PHP_VERSION }}
19+
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.PHP_VERSION }}
20+
run: |
21+
echo "actual_version=${$(docker run --rm --entrypoint sh ${IMAGE} -c 'php -v | head -n 1 | cut -d " " -f 2')}" >> "$GITHUB_OUTPUT"
22+
- name: Set up PHP version
23+
id: set_php_version
24+
env:
25+
actual_version: ${{ steps.php_version.outputs.actual_version }}
26+
run: |
27+
echo "${actual_version}"
28+

0 commit comments

Comments
 (0)