mirror of
https://github.com/wireadmin/wireadmin
synced 2025-01-23 04:17:00 +00:00
update
This commit is contained in:
parent
ee26a1984c
commit
3c953582ad
12
.github/workflows/docker-image.yaml
vendored
12
.github/workflows/docker-image.yaml
vendored
@ -9,8 +9,6 @@ on:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: shahradelahi/wireadmin
|
||||
# By default, image tag is the commit SHA
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -29,12 +27,16 @@ jobs:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.PRIVATE_TOKEN }}
|
||||
|
||||
# if it was a release tag, use the tag as the image tag
|
||||
# If it was a release tag, use the tag as the image tag,
|
||||
# and otherwise image tag is the commit SHA
|
||||
- name: Set image tag
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
echo "RELEASE_TAG=,ghcr.io/${IMAGE_NAME}:latest" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
if [[ $GITHUB_REF == refs/tags/v* ]]; then
|
||||
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_TAG=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "Labeling image with ${IMAGE_TAG}"
|
||||
|
||||
- name: Push to GitHub Container Registry
|
||||
|
Loading…
Reference in New Issue
Block a user