@@ -22,7 +22,7 @@ permissions:
2222 security-events : write
2323
2424jobs :
25- publish-x86 :
25+ publish :
2626 runs-on : SubtensorCI
2727
2828 steps :
6464 with :
6565 context : .
6666 push : true
67- platforms : linux/amd64
67+ platforms : linux/amd64,linux/arm64
6868 tags : |
69- ghcr.io/${{ github.repository }}:${{ env.tag }}-amd64
70- ${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest-amd64', 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@v3
97-
98- - name : Set up Docker Buildx
99- uses : docker/setup-buildx-action@v3
100-
101- - name : Login to GHCR
102- uses : docker/login-action@v3
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@v6
110- with :
111- context : .
112- push : true
113- platforms : linux/arm64
114- tags : |
115- ghcr.io/${{ github.repository }}:${{ env.tag }}-arm64
116- ${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest-arm64', github.repository) || '' }}
69+ ghcr.io/${{ github.repository }}:${{ env.tag }}
70+ ${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
0 commit comments