fix(actions): Always sort tags using name
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
a9f1743c0b
commit
a4577300a2
1 changed files with 14 additions and 14 deletions
28
.github/workflows/update-tag.yaml
vendored
28
.github/workflows/update-tag.yaml
vendored
|
|
@ -1,11 +1,11 @@
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
description: 'This workflow will build for patches for latest tag, and will Always use commit from main branch.'
|
description: "This workflow will build for patches for latest tag, and will Always use commit from main branch."
|
||||||
inputs:
|
inputs:
|
||||||
services:
|
services:
|
||||||
description: 'This action will update the latest tag with current main branch HEAD. Should I proceed ? true/false'
|
description: "This action will update the latest tag with current main branch HEAD. Should I proceed ? true/false"
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: "false"
|
||||||
|
|
||||||
name: Force Push tag with main branch HEAD
|
name: Force Push tag with main branch HEAD
|
||||||
|
|
||||||
|
|
@ -17,17 +17,17 @@ jobs:
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
||||||
DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }}
|
DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Set Remote with GITHUB_TOKEN
|
- name: Set Remote with GITHUB_TOKEN
|
||||||
run: |
|
run: |
|
||||||
git config --unset http.https://github.com/.extraheader
|
git config --unset http.https://github.com/.extraheader
|
||||||
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git
|
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
- name: Push main branch to tag
|
- name: Push main branch to tag
|
||||||
run: |
|
run: |
|
||||||
git fetch --tags
|
git fetch --tags
|
||||||
git checkout main
|
git checkout main
|
||||||
git push origin HEAD:refs/tags/$(git describe --tags `git rev-list --tags --max-count=1`) --force
|
git push origin HEAD:refs/tags/$(git tag --list 'v[0-9]*' --sort=-v:refname | head -n 1) --force
|
||||||
# - name: Debug Job
|
# - name: Debug Job
|
||||||
# if: ${{ failure() }}
|
# if: ${{ failure() }}
|
||||||
# uses: mxschmitt/action-tmate@v3
|
# uses: mxschmitt/action-tmate@v3
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue