Skip to content

Commit

Permalink
Merge pull request #1187 from opentensor/devnet-ready
Browse files Browse the repository at this point in the history
devnet deploy 1-23-2025
  • Loading branch information
sam0x17 authored Jan 23, 2025
2 parents d573819 + 357a9e1 commit 1114f2a
Show file tree
Hide file tree
Showing 52 changed files with 2,861 additions and 545 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
branch-or-tag:
description: "Branch or tag to use for the Docker image tag and ref to checkout (optional)"
required: false
default: ""

push:
branches:
- devnet-ready
- devnet
- testnet

permissions:
contents: read
Expand All @@ -16,8 +27,18 @@ jobs:
runs-on: SubtensorCI

steps:
- name: Determine Docker tag and ref
id: tag
run: |
branch_or_tag="${{ github.event.inputs.branch-or-tag || github.ref_name }}"
echo "Determined branch or tag: $branch_or_tag"
echo "tag=$branch_or_tag" >> $GITHUB_ENV
echo "ref=$branch_or_tag" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.ref }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -32,18 +53,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
ghcr.io/${{ github.repository }}:latest
labels: ${{ steps.meta.outputs.labels }}
ghcr.io/${{ github.repository }}:${{ env.tag }}
Loading

0 comments on commit 1114f2a

Please sign in to comment.