Skip to content

Commit a86dc65

Browse files
Feat: added push tag workflow
Chore: updated workflow push tag Fix: workflow push tag Fix: workflow push tag Fix: workflow push tag
1 parent 364977f commit a86dc65

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/build-and-push.yml renamed to .github/workflows/build-and-push-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
context: .
3232
push: true
3333
platforms: linux/amd64
34-
tags: davikingcode/nginx-php-fpm:latest
34+
tags: davikingcode/nginx-php-fpm:latest
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
name: Checkout
13+
uses: actions/checkout@v2
14+
-
15+
name: Set up QEMU
16+
uses: docker/setup-qemu-action@v1
17+
-
18+
name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v1
20+
-
21+
name: Login to DockerHub
22+
uses: docker/login-action@v1
23+
with:
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
-
27+
name: Set release version output
28+
id: vars
29+
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
30+
-
31+
name: Check release version output
32+
env:
33+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
34+
run: |
35+
echo $RELEASE_VERSION
36+
echo ${{ steps.vars.outputs.tag }}
37+
-
38+
name: Build and push
39+
env:
40+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
41+
uses: docker/build-push-action@v2
42+
with:
43+
context: .
44+
push: true
45+
platforms: linux/amd64
46+
tags: davikingcode/nginx-php-fpm:${{ env.RELEASE_VERSION }}

0 commit comments

Comments
 (0)