mirror of
https://github.com/matrixgpt/matrix-chatgpt-bot.git
synced 2024-10-01 01:25:41 -04:00
Update release.yml
add code to check branch
This commit is contained in:
parent
c059381f57
commit
e62328be03
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@ -4,7 +4,6 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
@ -13,6 +12,14 @@ jobs:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Check branch
|
||||
run: |
|
||||
BRANCH_NAME=$(git branch --contains ${{ github.sha }} | grep 'main')
|
||||
if [[ -z $BRANCH_NAME ]]; then
|
||||
echo "Tagged commit is not on main branch, aborting."
|
||||
exit 1
|
||||
fi
|
||||
-
|
||||
name: Docker meta
|
||||
id: meta
|
||||
|
Loading…
Reference in New Issue
Block a user