@@ -22,7 +22,7 @@ permissions:
22
22
security-events : write
23
23
24
24
jobs :
25
- publish :
25
+ publish-x86 :
26
26
runs-on : SubtensorCI
27
27
28
28
steps :
64
64
with :
65
65
context : .
66
66
push : true
67
- platforms : linux/amd64,linux/arm64
67
+ platforms : linux/amd64
68
+ tags : |
69
+ ghcr.io/${{ github.repository }}:${{ env.tag }}
70
+ ${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
71
+ publish-arm :
72
+ runs-on : SubtensorCI
73
+
74
+ steps :
75
+ - name : Determine Docker tag and ref
76
+ id : tag
77
+ run : |
78
+ branch_or_tag="${{ github.event.inputs.branch-or-tag || github.ref_name }}"
79
+ echo "Determined branch or tag: $branch_or_tag"
80
+ echo "tag=$branch_or_tag" >> $GITHUB_ENV
81
+ echo "ref=$branch_or_tag" >> $GITHUB_ENV
82
+
83
+ # Check if this is a tagged release (not devnet-ready/devnet/testnet)
84
+ if [[ "${{ github.event_name }}" == "release" && "$branch_or_tag" != "devnet-ready" && "$branch_or_tag" != "devnet" && "$branch_or_tag" != "testnet" ]]; then
85
+ echo "latest_tag=true" >> $GITHUB_ENV
86
+ else
87
+ echo "latest_tag=false" >> $GITHUB_ENV
88
+ fi
89
+
90
+ - name : Checkout code
91
+ uses : actions/checkout@v4
92
+ with :
93
+ ref : ${{ env.ref }}
94
+
95
+ - name : Set up QEMU
96
+ uses : docker/setup-qemu-action@v2
97
+
98
+ - name : Set up Docker Buildx
99
+ uses : docker/setup-buildx-action@v2
100
+
101
+ - name : Login to GHCR
102
+ uses : docker/login-action@v2
103
+ with :
104
+ registry : ghcr.io
105
+ username : ${{ github.actor }}
106
+ password : ${{ secrets.GITHUB_TOKEN }}
107
+
108
+ - name : Build and push Docker image
109
+ uses : docker/build-push-action@v4
110
+ with :
111
+ context : .
112
+ push : true
113
+ platforms : linux/arm64
68
114
tags : |
69
115
ghcr.io/${{ github.repository }}:${{ env.tag }}
70
116
${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
0 commit comments