Docker package build (#3816)

* bin: ability to use chain type argument for 'run' subcommand

* docker: single image for mainnet and testnet, update build docs

* docker: root user

* github: ghcr publish

* github: build image for master branch only

* docs: fix paths

* docker: move 'server run' to command

* Revert "bin: ability to use chain type argument for 'run' subcommand"

This reverts commit fc2d9199c3ff80c5c7305e3fc5b1f6fe86e8dacf.

* docker: disable tui at config
This commit is contained in:
ardocrat
2026-01-06 21:39:18 +03:00
committed by GitHub
parent dc6f8d2520
commit da7b6b5c50
9 changed files with 83 additions and 111 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Build and Push to GHCR
on:
push:
branches: [master]
jobs:
build-andpush:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Generate image tag
id: vars
run: echo "tag=$(awk -F'"' '/^version/{ print $2; exit; }' Cargo.toml)" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ secrets.GHCR_USERNAME }}/grin:latest
ghcr.io/${{ secrets.GHCR_USERNAME }}/grin:${{ steps.vars.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max