Skip to content

add upload progress bar #21

add upload progress bar

add upload progress bar #21

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches:
- master
jobs:
build:
strategy:
matrix:
include:
- arch: amd64
cross: false
target: x86_64-unknown-linux-musl
- arch: arm64
cross: true
target: aarch64-unknown-linux-musl
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-${{ matrix.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log into GitHub Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.7
- name: Make shared requirements
run: |
make web
- name: Set the docker name
run: |
echo "DOCKER_NAME=${REPO,,}" >> $GITHUB_ENV
env:
REPO: ${{ github.repository }}
- name: Install comple dependencies
run: |
sudo apt-get install -y musl-tools musl-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build binary for ${{ matrix.arch }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}
use-cross: ${{ matrix.cross }}
- name: Build and push Docker image for ${{ matrix.arch }}
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/${{ matrix.arch }}
tags: ghcr.io/${{ env.DOCKER_NAME }}:${{ matrix.arch }}