mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-10-14 15:11:26 +00:00
[fix] 优化镜像构建流程
This commit is contained in:
15
.github/workflows/docker-deploy.yml
vendored
15
.github/workflows/docker-deploy.yml
vendored
@@ -25,15 +25,14 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract tag name
|
- name: Set tag name
|
||||||
if: github.event_name == 'release'
|
|
||||||
id: tag_name
|
id: tag_name
|
||||||
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "release" ]; then
|
||||||
- name: Set manual tag name
|
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
|
||||||
if: github.event_name == 'workflow_dispatch'
|
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
id: tag_name
|
echo "::set-output name=tag::${{ github.event.inputs.tag }}"
|
||||||
run: echo "::set-output name=tag::${{ github.event.inputs.tag }}"
|
fi
|
||||||
|
|
||||||
- name: Build and push Docker image with Release tag
|
- name: Build and push Docker image with Release tag
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
|
Reference in New Issue
Block a user