Skip to content

Commit 539aa7a

Browse files
committed
refactor: print version
1 parent b6ae502 commit 539aa7a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ jobs:
6565
- name: Set tag and version
6666
id: meta
6767
run: |
68+
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
69+
echo $VERSION
6870
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
6971
TAG="latest"
7072
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
@@ -87,3 +89,46 @@ jobs:
8789
platforms: linux/arm64
8890
push: true
8991
tags: ${{ steps.meta.outputs.tags }}
92+
93+
combine-manifests:
94+
needs: [docker-amd, docker-arm]
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Checkout
98+
uses: actions/checkout@v4
99+
100+
- name: Set up Docker Buildx
101+
uses: docker/setup-buildx-action@v3
102+
103+
- name: Login to Docker Hub
104+
uses: docker/login-action@v3
105+
with:
106+
username: ${{ secrets.DOCKERHUB_USERNAME }}
107+
password: ${{ secrets.DOCKERHUB_TOKEN }}
108+
109+
- name: Create and push manifests
110+
run: |
111+
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
112+
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
113+
TAG="latest"
114+
115+
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
116+
${IMAGE_NAME}:${TAG}-amd64 \
117+
${IMAGE_NAME}:${TAG}-arm64
118+
119+
docker buildx imagetools create -t ${IMAGE_NAME}:${VERSION} \
120+
${IMAGE_NAME}:${TAG}-amd64 \
121+
${IMAGE_NAME}:${TAG}-arm64
122+
123+
elif [ "${{ github.ref }}" = "refs/heads/canary" ]; then
124+
TAG="canary"
125+
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
126+
${IMAGE_NAME}:${TAG}-amd64 \
127+
${IMAGE_NAME}:${TAG}-arm64
128+
129+
else
130+
TAG="feature"
131+
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
132+
${IMAGE_NAME}:${TAG}-amd64 \
133+
${IMAGE_NAME}:${TAG}-arm64
134+
fi

0 commit comments

Comments
 (0)