Skip to content

Publish Docker images #9

Publish Docker images

Publish Docker images #9

Workflow file for this run

name: Publish Docker images
on:
workflow_dispatch:
release:
types: [published]
jobs:
push_fullnode_to_registry:
name: Push fullnode Docker image to fly.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: 🔑 Fly Registry Auth
uses: docker/login-action@v1
with:
registry: registry.fly.io
username: x
password: ${{ secrets.FLY_API_TOKEN }}
- name: 🐳 Docker build (fullnode)
uses: docker/build-push-action@v2
with:
context: .
file: ./fullnode.Dockerfile
push: true
tags: registry.fly.io/cartezcash-fullnode:latest
build-args: |
COMMIT_SHA=${{ github.sha }}
push_cartesi_node_to_registry:
name: Push cartesi node Docker image to fly.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: 🔑 Fly Registry Auth
uses: docker/login-action@v1
with:
registry: registry.fly.io
username: x
password: ${{ secrets.FLY_API_TOKEN }}
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
# required for the cross-compilation, else it will error with `exec format error
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Cartesi CLI and build
run: |
npm install -g @cartesi/cli
cartesi build
IMAGE_TAG=$(cartesi deploy build --platform linux/amd64 | grep "Application node Docker image" | awk '{print $NF}')
docker tag $IMAGE_TAG registry.fly.io/cartezcash:latest
docker push registry.fly.io/cartezcash:latest