update working docker_compose example #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build reddcoind on push, or PR to master | |
env: | |
APP: reddcoind | |
on: | |
push: | |
branches: [ 'master' ] | |
pull_request: | |
branches: [ 'master' ] | |
jobs: | |
build: | |
name: Build reddcoind | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
subver: | |
- '4.22' | |
arch: | |
- amd64 | |
- arm32v7 | |
- arm64v8 | |
env: | |
QEMU_VERSION: v5.0.0 | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Register self-compiled qemu | |
if: matrix.arch != 'amd64' | |
run: docker run --rm --privileged "meedamian/simple-qemu:$QEMU_VERSION-${{ matrix.arch }}" -p yes | |
- name: Build ${{ env.APP }} | |
run: > | |
docker build "${{ matrix.subver }}/" | |
--build-arg "ARCH=${{ matrix.arch }}" | |
--tag "$APP" | |
- name: Show built image details | |
run: docker images "$APP" | |
- name: Run sanity checks | |
env: | |
DIR: /usr/local/bin | |
MINOR: ${{ matrix.subver }} | |
run: | | |
run() { | |
ENTRYPOINT="${1:-$APP}"; shift | |
ARGS=${*:-"--version"} | |
printf "\n$ %s %s\n" "$ENTRYPOINT" "$ARGS" | |
docker run --rm --entrypoint "$ENTRYPOINT" "$APP" $ARGS | |
} | |
docker inspect "$APP" | jq '.' | |
printf "\n" | |
run reddcoind | head -n 1 | |
run reddcoin-cli | |
run reddcoin-tx --help | head -n 1 | |
run reddcoin-wallet --help | head -n 1 | |
run uname -a | |
run cat /etc/os-release | |
run sha256sum "$DIR/reddcoind" "$DIR/reddcoin-cli" |