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

Commit

Permalink
Update publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wfg committed Nov 9, 2021
1 parent 5f62e9d commit 6b35bb7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Publish

on:
workflow_dispatch:
inputs:
image_tag:
description: 'Image tag'
required: true
default: 'latest'
push:
tags:
- 'v*'

env:
IMAGE_NAME: openvpn-client
Expand All @@ -29,12 +26,13 @@ jobs:
- name: Create tags
id: tags
run: |
vpatch=${{ github.event.inputs.image_tag }}
ref=${{ github.ref }}
vpatch=${ref##refs/*/}
echo ::set-output name=vpatch::$vpatch
echo ::set-output name=vminor::${vpatch%.*}
echo ::set-output name=vmajor::${vpatch%%.*}
patch=${${{ github.event.inputs.image_tag }}#v}
patch=${vpatch#v}
echo ::set-output name=patch::$patch
echo ::set-output name=minor::${patch%.*}
echo ::set-output name=major::${patch%%.*}
Expand Down

0 comments on commit 6b35bb7

Please sign in to comment.