Skip to content

Commit 67f160b

Browse files
author
Roman
committed
Merge branch 'devnet-ready' into devnet-ready-with-nodes
2 parents da7cd72 + 733353b commit 67f160b

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

.github/workflows/docker.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ permissions:
2222
security-events: write
2323

2424
jobs:
25-
publish:
25+
publish-x86:
2626
runs-on: SubtensorCI
2727

2828
steps:
@@ -64,7 +64,53 @@ jobs:
6464
with:
6565
context: .
6666
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
68114
tags: |
69115
ghcr.io/${{ github.repository }}:${{ env.tag }}
70116
${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}

0 commit comments

Comments
 (0)