mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-17 04:43:02 +00:00
Update maven.yml
构建docker添加tag版本
This commit is contained in:
12
.github/workflows/maven.yml
vendored
12
.github/workflows/maven.yml
vendored
@@ -76,6 +76,13 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Extract git tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
GIT_TAG=$(git tag --points-at HEAD | head -n 1)
|
||||||
|
echo "tag=$GIT_TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -83,6 +90,5 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository }}:$(echo $(git tag --points-at HEAD) | sed 's/ /,/g')
|
ghcr.io/qaiu/netdisk-fast-download:${{ steps.tag.outputs.tag }}
|
||||||
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
ghcr.io/qaiu/netdisk-fast-download:latest
|
||||||
ghcr.io/${{ github.repository }}:main
|
|
||||||
|
|||||||
Reference in New Issue
Block a user