Skip to content

Commit

Permalink
处理beta版本标签
Browse files Browse the repository at this point in the history
  • Loading branch information
HisAtri committed Mar 19, 2024
1 parent 8697955 commit 9441e38
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ jobs:
- name: Generate App Version
run: echo APP_VERSION=`git describe --tags --always` >> $GITHUB_ENV

- name: Handle beta version
run: |
if [[ "${{ env.APP_VERSION }}" == *"beta"* ]]; then
echo APP_TAG=dev >> $GITHUB_ENV
else
echo APP_TAG=latest >> $GITHUB_ENV
fi
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -41,8 +49,8 @@ jobs:
linux/arm/v6
build-tags:
APP_NAME=lyricsapi
APP_NAME=lrcapi
APP_VERSION=${{ env.APP_VERSION }}
tags: |
${{ secrets.DOCKERHUB_USER }}/lyricsapi:${{ env.APP_VERSION }}
${{ contains(env.APP_VERSION, 'beta') && secrets.DOCKERHUB_USER }}/lyricsapi:latest
${{ secrets.DOCKERHUB_USER }}/lrcapi:${{ env.APP_VERSION }}
${{ secrets.DOCKERHUB_USER }}/lrcapi:${{ env.APP_TAG }}

0 comments on commit 9441e38

Please sign in to comment.