mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: print version
This commit is contained in:
45
.github/workflows/docker-build.yml
vendored
45
.github/workflows/docker-build.yml
vendored
@@ -65,6 +65,8 @@ jobs:
|
|||||||
- name: Set tag and version
|
- name: Set tag and version
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
|
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
||||||
|
echo $VERSION
|
||||||
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||||
TAG="latest"
|
TAG="latest"
|
||||||
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
||||||
@@ -87,3 +89,46 @@ jobs:
|
|||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
|
combine-manifests:
|
||||||
|
needs: [docker-amd, docker-arm]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create and push manifests
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||||
|
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
||||||
|
TAG="latest"
|
||||||
|
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${VERSION} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
|
||||||
|
elif [ "${{ github.ref }}" = "refs/heads/canary" ]; then
|
||||||
|
TAG="canary"
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
|
||||||
|
else
|
||||||
|
TAG="feature"
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user