Skip to content

Migrate from Solochain Frontier to Relaychain (#166) #9

Migrate from Solochain Frontier to Relaychain (#166)

Migrate from Solochain Frontier to Relaychain (#166) #9

name: Build Docker Image
on:
push:
branches:
- devnet
- testnet
- stagenet
- mainnet
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- run: docker login --username atletanetwork --password ${{ secrets.REGISTRYPASS }} docker.io
- name: Detect build features
id: features
run: |
case ${{ github.ref_name }} in
mainnet)
echo "build_features=mainnet-runtime" >> "$GITHUB_OUTPUT" ;;
stagenet)
echo "build_features=mainnet-runtime" >> "$GITHUB_OUTPUT" ;;
testnet)
echo "build_features=testnet-runtime" >> "$GITHUB_OUTPUT" ;;
devnet)
echo "build_features=devnet-runtime" >> "$GITHUB_OUTPUT" ;;
*)
echo "Unable to detect build features for '${{ github.ref_name }}'"
exit 1 ;;
esac
- name: Build and Push Docker Image
env:
build_features: ${{ steps.features.outputs.build_features }}
image_tag: ${{ github.ref_name }}
run: |
TIMESTAMP=$(date +%d%m%y-%H%M%S)
docker build --build-arg BUILD_FEATURES=${build_features} --tag docker.io/atletanetwork/atleta-node:${image_tag}-${TIMESTAMP} .
docker tag docker.io/atletanetwork/atleta-node:${image_tag}-${TIMESTAMP} docker.io/atletanetwork/atleta-node:${image_tag}-latest
docker push docker.io/atletanetwork/atleta-node:${image_tag}-${TIMESTAMP}
docker push docker.io/atletanetwork/atleta-node:${image_tag}-latest