|
13 | 13 | - name: Checkout repository |
14 | 14 | uses: actions/checkout@v3 |
15 | 15 |
|
| 16 | + - name: Set tag and version |
| 17 | + id: meta-cloud |
| 18 | + run: | |
| 19 | + VERSION=$(jq -r .version apps/dokploy/package.json) |
| 20 | + echo "version=$VERSION" >> $GITHUB_OUTPUT |
| 21 | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then |
| 22 | + echo "tags=siumauricio/cloud:latest,siumauricio/cloud:${VERSION}" >> $GITHUB_OUTPUT |
| 23 | + else |
| 24 | + echo "tags=siumauricio/cloud:canary" >> $GITHUB_OUTPUT |
| 25 | + fi |
| 26 | +
|
16 | 27 | - name: Log in to Docker Hub |
17 | 28 | uses: docker/login-action@v2 |
18 | 29 | with: |
|
25 | 36 | context: . |
26 | 37 | file: ./Dockerfile.cloud |
27 | 38 | push: true |
28 | | - tags: | |
29 | | - siumauricio/cloud:${{ github.ref_name == 'main' && 'latest' || 'canary' }} |
| 39 | + tags: ${{ steps.meta-cloud.outputs.tags }} |
30 | 40 | platforms: linux/amd64 |
31 | 41 | build-args: | |
32 | 42 | NEXT_PUBLIC_UMAMI_HOST=${{ secrets.NEXT_PUBLIC_UMAMI_HOST }} |
|
40 | 50 | - name: Checkout repository |
41 | 51 | uses: actions/checkout@v3 |
42 | 52 |
|
| 53 | + - name: Set tag and version |
| 54 | + id: meta-schedule |
| 55 | + run: | |
| 56 | + VERSION=$(jq -r .version apps/dokploy/package.json) |
| 57 | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then |
| 58 | + echo "tags=siumauricio/schedule:latest,siumauricio/schedule:${VERSION}" >> $GITHUB_OUTPUT |
| 59 | + else |
| 60 | + echo "tags=siumauricio/schedule:canary" >> $GITHUB_OUTPUT |
| 61 | + fi |
| 62 | +
|
43 | 63 | - name: Log in to Docker Hub |
44 | 64 | uses: docker/login-action@v2 |
45 | 65 | with: |
|
52 | 72 | context: . |
53 | 73 | file: ./Dockerfile.schedule |
54 | 74 | push: true |
55 | | - tags: | |
56 | | - siumauricio/schedule:${{ github.ref_name == 'main' && 'latest' || 'canary' }} |
| 75 | + tags: ${{ steps.meta-schedule.outputs.tags }} |
57 | 76 | platforms: linux/amd64 |
58 | 77 |
|
59 | 78 | build-and-push-server-image: |
|
63 | 82 | - name: Checkout repository |
64 | 83 | uses: actions/checkout@v3 |
65 | 84 |
|
| 85 | + - name: Set tag and version |
| 86 | + id: meta-server |
| 87 | + run: | |
| 88 | + VERSION=$(jq -r .version apps/dokploy/package.json) |
| 89 | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then |
| 90 | + echo "tags=siumauricio/server:latest,siumauricio/server:${VERSION}" >> $GITHUB_OUTPUT |
| 91 | + else |
| 92 | + echo "tags=siumauricio/server:canary" >> $GITHUB_OUTPUT |
| 93 | + fi |
| 94 | +
|
66 | 95 | - name: Log in to Docker Hub |
67 | 96 | uses: docker/login-action@v2 |
68 | 97 | with: |
|
75 | 104 | context: . |
76 | 105 | file: ./Dockerfile.server |
77 | 106 | push: true |
78 | | - tags: | |
79 | | - siumauricio/server:${{ github.ref_name == 'main' && 'latest' || 'canary' }} |
| 107 | + tags: ${{ steps.meta-server.outputs.tags }} |
80 | 108 | platforms: linux/amd64 |
0 commit comments