mirror of
https://github.com/mochi-mqtt/server.git
synced 2025-10-30 03:01:58 +08:00
Update build.yml
This commit is contained in:
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -45,15 +45,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Metadata
|
- name: Docker meta
|
||||||
id: tags
|
id: meta
|
||||||
run: |
|
uses: docker/metadata-action@v5
|
||||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
with:
|
||||||
TAGS='["mochimqtt/server:latest","mochimqtt/server:'${GITHUB_REF/refs\/tags\//}'"]'
|
images: mochimqtt/server
|
||||||
else
|
tags: |
|
||||||
TAGS='["mochimqtt/server:latest"]'
|
type=semver,pattern={{version}}
|
||||||
fi
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
echo "name=tags" >> $TAGS
|
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -67,4 +67,5 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.tags.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
Reference in New Issue
Block a user