|
65 | 65 | - name: Set tag and version |
66 | 66 | id: meta |
67 | 67 | run: | |
| 68 | + VERSION=$(node -p "require('./apps/dokploy/package.json').version") |
| 69 | + echo $VERSION |
68 | 70 | if [ "${{ github.ref }}" = "refs/heads/main" ]; then |
69 | 71 | TAG="latest" |
70 | 72 | VERSION=$(node -p "require('./apps/dokploy/package.json').version") |
|
87 | 89 | platforms: linux/arm64 |
88 | 90 | push: true |
89 | 91 | 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