Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -12,15 +12,33 @@ jobs:
|
|||||||
# Accessing the context for Github
|
# Accessing the context for Github
|
||||||
if: ${{ github.event.pull_request.merged == true }}
|
if: ${{ github.event.pull_request.merged == true }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
# On GitHub this grants tag push; on Gitea it's ignored, but harmless.
|
||||||
- uses: actions/checkout@v4
|
permissions:
|
||||||
with:
|
contents: write
|
||||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
|
||||||
fetch-depth: '0'
|
|
||||||
|
|
||||||
- name: Bump version and push tag
|
steps:
|
||||||
uses: anothrNick/github-tag-action@1.64.0
|
- name: Checkout main (not the merge SHA)
|
||||||
env:
|
uses: actions/checkout@v4
|
||||||
# if you don't want to set write permissions use a PAT token
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
ref: main # create a local 'main'
|
||||||
WITH_V: true
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Ensure local 'main' tracks origin/main (for Gitea runners)
|
||||||
|
run: |
|
||||||
|
git fetch origin main --tags
|
||||||
|
# Force-create/update local main to point at remote
|
||||||
|
git branch -f main origin/main
|
||||||
|
git checkout main
|
||||||
|
git config user.name "hangpersonal"
|
||||||
|
git config user.email "hangcui1201@gmail.com"
|
||||||
|
|
||||||
|
- name: Bump version and push tag
|
||||||
|
uses: anothrNick/github-tag-action@1.64.0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
WITH_V: true
|
||||||
|
DEFAULT_BUMP: minor
|
||||||
|
DEFAULT_BRANCH: main
|
||||||
|
RELEASE_BRANCHES: main
|
||||||
|
TAG_CONTEXT: repo
|
||||||
Reference in New Issue
Block a user