Test tags version
This commit is contained in:
parent
7976dc425a
commit
3f535d14ae
1 changed files with 40 additions and 0 deletions
40
.github/workflows/release.yaml
vendored
Normal file
40
.github/workflows/release.yaml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: remote-build
|
||||
run-name: remote-build ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
# tags-ignore:
|
||||
# - '2.*'
|
||||
# Allow run workflow manually from Action tab
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "version for build image"
|
||||
type: string
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: demo/qualifying-exam-cms
|
||||
# IMAGE_TAG: 0.2.1
|
||||
jobs:
|
||||
# export GITHUB_REF=refs/tags/v1.2.3
|
||||
# act workflow_dispatch --input IMAGE_VER=v0.2.1 -W .github/workflows/release.yaml -j release
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Gen tags
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='beta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Test
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue