mirror of https://github.com/miaowware/qrm2.git
parent
aefca97e4f
commit
8f1782dcc0
|
@ -27,7 +27,9 @@ jobs:
|
||||||
- name: Build image
|
- name: Build image
|
||||||
id: build_image
|
id: build_image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME=${GITHUB_REPOSITORY#*/}
|
IMAGE_ID=${GITHUB_REPOSITORY,,}
|
||||||
|
IMAGE_NAME=${IMAGE_ID#*/}
|
||||||
|
echo ::set-output name=image_id::$IMAGE_ID
|
||||||
echo ::set-output name=image_name::$IMAGE_NAME
|
echo ::set-output name=image_name::$IMAGE_NAME
|
||||||
docker build . --file Dockerfile -t $IMAGE_NAME
|
docker build . --file Dockerfile -t $IMAGE_NAME
|
||||||
|
|
||||||
|
@ -42,7 +44,7 @@ jobs:
|
||||||
id: tag_image
|
id: tag_image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME=${{ steps.build_image.outputs.image_name }}
|
IMAGE_NAME=${{ steps.build_image.outputs.image_name }}
|
||||||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
IMAGE_ID=ghcr.io/${{ steps.build_image.outputs.image_id }}
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
echo IMAGE_ID=$IMAGE_ID
|
||||||
echo ::set-output name=image_id::$IMAGE_ID
|
echo ::set-output name=image_id::$IMAGE_ID
|
||||||
|
|
||||||
|
@ -62,8 +64,11 @@ jobs:
|
||||||
|
|
||||||
- name: Push images to registry
|
- name: Push images to registry
|
||||||
run: |
|
run: |
|
||||||
[[ "${{ steps.tag_image.outputs.version }}" != "dev" ]] && docker push ${{ steps.tag_image.outputs.image_id }}:latest || true
|
VERSION=${{ steps.tag_image.outputs.version }}
|
||||||
docker push ${{ steps.tag_image.outputs.image_id }}:${{ steps.tag_image.outputs.version }}
|
IMAGE_ID=${{ steps.tag_image.outputs.image_id }}
|
||||||
|
|
||||||
|
[[ "$VERSION" != "dev" ]] && docker push $IMAGE_ID:latest || true
|
||||||
|
docker push $IMAGE_ID:$VERSION
|
||||||
|
|
||||||
- name: Deploy official images
|
- name: Deploy official images
|
||||||
id: deploy_images
|
id: deploy_images
|
||||||
|
|
Loading…
Reference in New Issue