Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 6b35bb7

Browse files
committed
Update publishing workflow
1 parent 5f62e9d commit 6b35bb7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Publish
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
image_tag:
7-
description: 'Image tag'
8-
required: true
9-
default: 'latest'
4+
push:
5+
tags:
6+
- 'v*'
107

118
env:
129
IMAGE_NAME: openvpn-client
@@ -29,12 +26,13 @@ jobs:
2926
- name: Create tags
3027
id: tags
3128
run: |
32-
vpatch=${{ github.event.inputs.image_tag }}
29+
ref=${{ github.ref }}
30+
vpatch=${ref##refs/*/}
3331
echo ::set-output name=vpatch::$vpatch
3432
echo ::set-output name=vminor::${vpatch%.*}
3533
echo ::set-output name=vmajor::${vpatch%%.*}
3634
37-
patch=${${{ github.event.inputs.image_tag }}#v}
35+
patch=${vpatch#v}
3836
echo ::set-output name=patch::$patch
3937
echo ::set-output name=minor::${patch%.*}
4038
echo ::set-output name=major::${patch%%.*}

0 commit comments

Comments
 (0)