Skip to content

Commit f80a25a

Browse files
authored
Add workflow for maintaining the v1 via a tag instead of a branch (ddev#9)
* Create update-main-version.yml * Update update-main-version.yml * Update update-main-version.yml * Run on tagging instead of release * Update update-main-version.yml * Update update-main-version.yml
1 parent 83891cf commit f80a25a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Main Version
2+
run-name: Move ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} to ${{ github.event.inputs.target || github.sha }}
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v[0-9]+.**'
8+
workflow_dispatch:
9+
inputs:
10+
target:
11+
description: The tag or reference to use
12+
required: true
13+
major_version:
14+
type: choice
15+
description: The major version to update
16+
options:
17+
- v1
18+
19+
env:
20+
MAJOR_VERSION: 'v1'
21+
22+
jobs:
23+
tag:
24+
runs-on: ubuntu-lates
25+
permissions:
26+
contents: write
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0
31+
- name: Git config
32+
run: |
33+
git config user.name github-actions
34+
git config user.email github-actions@github.com
35+
#- name: Get major version from tag name
36+
# if: ${{ github.event_name === 'push' }}
37+
# run: echo "MAJOR_VERSION=`echo ${GITHUB_REF#refs/*/} | cut -c1-2`" >> $GITHUB_ENV
38+
- name: Tag new target
39+
run: git tag -f ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} ${{ github.event.inputs.target || github.sha }}
40+
- name: Push new tag
41+
run: git push origin ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} --force

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy