Skip to content

Revamp README (#1601) #400

Revamp README (#1601)

Revamp README (#1601) #400

Workflow file for this run

name: Staging
on:
push:
branches: [main]
workflow_dispatch:
env:
CACHE_VERSION: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_TERM_COLOR: always
DOCKER_REGISTRY: ghcr.io
RUST_BACKTRACE: full
jobs:
build-node:
name: Build node
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: false
- name: Set swap space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Fetch latest code
uses: actions/checkout@v4
- name: Build node
uses: ./.github/actions/build
with:
package: darwinia
features: all-runtime
cache_prefix: staging-${{ env.CACHE_VERSION }}
enable_cache: true
enable_tar_bz2: true
- name: Upload node
uses: actions/upload-artifact@v4
with:
name: darwinia
path: build
retention-days: 1
build-docker-image:
name: Build image
runs-on: ubuntu-latest
needs: [build-node]
steps:
- name: Fetch Dockerfile
uses: actions/checkout@v4
- name: Download node
uses: actions/download-artifact@v4
- name: Extract node
run: |
mkdir -p dist
tar -xvf darwinia/darwinia-x86_64-linux-gnu.tar.bz2 -C dist/
- name: Sha
uses: benjlevesque/short-sha@v3.0
- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.DOCKER_REGISTRY }}
- name: Publish docker image
uses: docker/build-push-action@v5
with:
push: true
context: .
file: .maintain/docker/Dockerfile
tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}:sha-${{ env.SHA }}