v0.5.8
This commit is contained in:
4 files changed
+18
-10
No files matched your search
@@ -139,7 +139,7 @@ jobs:
|
||||
|
||||
push_to_registry:
|
||||
name: Build Docker image
|
||||
if: startsWith(github.ref, 'refs/tags/') == false && github.event_name == 'push'
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- "cross"
|
||||
@@ -183,11 +183,19 @@ jobs:
|
||||
- name: Get tag name
|
||||
if: ${{ steps.vars.outputs.HAS_SECRET_TOKEN }}
|
||||
id: tags
|
||||
shell: bash
|
||||
run: |
|
||||
branch="$(echo "${GITHUB_REF#refs/heads/}" | sed -E 's|[/]|-|g')"
|
||||
tags="${REPO_NAME}:${branch}"
|
||||
if [ "${branch}" == "master" ]; then
|
||||
tags="${tags},${REPO_NAME}:latest"
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
tags=""
|
||||
if [[ "${GITHUB_REF}" =~ ^'refs/tags/'(.*) ]]; then
|
||||
gittag="$(echo "${BASH_REMATCH[1]}" | sed -E 's|[/]|-|g')"
|
||||
tags=""${REPO_NAME}:${gittag}"
|
||||
elif [[ "${GITHUB_REF}" =~ ^'refs/heads/'(.*) ]]; then
|
||||
branch="$(echo "${BASH_REMATCH[1]}" | sed -E 's|[/]|-|g')"
|
||||
tags="${REPO_NAME}:${branch}"
|
||||
if [ "${branch}" == "master" ]; then
|
||||
tags="${tags},${REPO_NAME}:latest"
|
||||
fi
|
||||
fi
|
||||
echo "TAGS=${tags}" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user