feat(peer_manager): integrate peer blocking functionality into modula… #492
This file contains hidden or 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: Docker build and push | |
on: | |
push: | |
branches: | |
- unstable | |
- stable | |
- interop1 | |
tags: | |
- v* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_VERSION: '1.87.0' | |
# Deny warnings in CI | |
RUSTFLAGS: "-D warnings -C debuginfo=0" | |
# Prevent Github API rate limiting | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/anchor | |
jobs: | |
extract-version: | |
uses: ./.github/workflows/extract-version.yml | |
build-docker: | |
name: build-docker | |
runs-on: ${{ matrix.target.runner }} | |
strategy: | |
matrix: | |
target: | |
- runner: ubuntu-24.04 | |
docker-arch: amd64 | |
- runner: ubuntu-24.04-arm | |
docker-arch: arm64 | |
include: | |
- profile: maxperf | |
needs: [extract-version] | |
env: | |
VERSION: ${{ needs.extract-version.outputs.VERSION }} | |
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Dockerhub login | |
run: | | |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/${{ matrix.target.docker-arch }} | |
labels: | | |
git.revision=${{ github.sha }} | |
git.branch=${{ github.ref }} | |
git.tag=${{ github.ref }} | |
git.repository=${{ github.repository }} | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}${{ env.VERSION_SUFFIX}}-${{ matrix.target.docker-arch }} | |
build-args: | | |
RUST_VERSION=${{ env.RUST_VERSION }} | |
PROFILE=${{ matrix.profile }} | |
FEATURES=portable | |
docker-multiarch-manifest: | |
name: docker-multiarch-manifest | |
runs-on: ubuntu-24.04 | |
needs: [build-docker, extract-version] | |
env: | |
# We need to enable experimental docker features in order to use `docker manifest` | |
DOCKER_CLI_EXPERIMENTAL: enabled | |
VERSION: ${{ needs.extract-version.outputs.VERSION }} | |
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }} | |
steps: | |
- name: Dockerhub login | |
run: | | |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin | |
- name: Create and push multiarch manifest | |
run: | | |
docker buildx imagetools create -t ${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX} \ | |
${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX}-amd64 \ | |
${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX}-arm64; |