mirror of
https://github.com/wireadmin/wireadmin
synced 2025-04-20 14:14:32 +00:00
update
This commit is contained in:
parent
23b9cf2a1b
commit
cb6f8f4ba3
15
.github/workflows/docker-image.yaml
vendored
15
.github/workflows/docker-image.yaml
vendored
@ -9,8 +9,6 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: shahradelahi/wireadmin
|
IMAGE_NAME: shahradelahi/wireadmin
|
||||||
# By default, image tag is the commit SHA
|
|
||||||
IMAGE_TAG: ${{ github.sha }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -29,13 +27,18 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PRIVATE_TOKEN }}
|
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
|
- name: Set image tag
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: |
|
run: |
|
||||||
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
||||||
echo "IMAGE_TAG=${IMAGE_TAG//./-}" >> $GITHUB_ENV
|
|
||||||
echo "RELEASE_TAG=,ghcr.io/${IMAGE_NAME}:latest" >> $GITHUB_ENV
|
echo "RELEASE_TAG=,ghcr.io/${IMAGE_NAME}:latest" >> $GITHUB_ENV
|
||||||
|
if [[ $GITHUB_REF == refs/tags/v* ]]; then
|
||||||
|
echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}"
|
||||||
|
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "Labeling image with commit SHA: ${GITHUB_SHA}"
|
||||||
|
echo "IMAGE_TAG=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Push to GitHub Container Registry
|
- name: Push to GitHub Container Registry
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
|
Loading…
Reference in New Issue
Block a user