Skip to content

Commit

Permalink
ci: testing build
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmillennick committed Feb 4, 2025
1 parent 4c44b06 commit 76dc5c0
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build-push-containers-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ jobs:
with:
container_name: ${{ matrix.container_name }}


build-push-checked-manifest:
uses: ./.github/workflows/build-push-manifest.yml
name: Build Push Checked Manifest
needs:
- build-push-checked-containers
secrets: inherit
strategy:
matrix:
container_name:
- movement-full-node
with:
container_name: ${{ matrix.container_name }}


container-checks:
if: github.event.label.name == 'cicd:movement-containers' || github.ref == 'refs/heads/main'
runs-on: buildjet-8vcpu-ubuntu-2204
needs:
- build-push-checked-containers
- build-push-checked-manifest
steps:

- name: Checkout repository
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/build-push-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Build/Push Manifest

on:
workflow_call:
inputs:
container_name:
type: string
description: The name of the container to build
required: true
secrets:
INFRA_GH_TOKEN:
required: true
DOCKER_HUB_USERNAME:
required: true
DOCKER_HUB_TOKEN:
required: true

jobs:
manifest-build:
name: Build ${{ inputs.container_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.INFRA_GH_TOKEN }}
- name: Login to Docker Hub for rate limiting
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push container tags
run: |
./scripts/docker/build-push-manifest -n ${{ inputs.container_name }}
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# platforms: linux/amd64,linux/arm64
# push: true
# tags: user/app:latest
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# submodules: true
# ref: ${{ github.event.pull_request.head.ref || github.ref }}


# - name: Login to GHCR
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.INFRA_GH_TOKEN }}

# - name: Login to Docker Hub for rate limiting
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_TOKEN }}

# - name: Build and push container tags
# run: |
# ./scripts/docker/build-push-container -n ${{ inputs.container_name }}

# container-manifest:
# name: Manifest ${{ inputs.container_name }}
# needs: container-build
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# submodules: true
# ref: ${{ github.event.pull_request.head.ref || github.ref }}

# - name: Login to GHCR
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.INFRA_GH_TOKEN }}

# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_TOKEN }}

# - name: Build and push container manifest
# run: |
# ./scripts/docker/build-push-manifest -n ${{ inputs.container_name }}
10 changes: 5 additions & 5 deletions scripts/docker/build-push-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ if [ "$debug" = true ]; then
done
fi

for tag in "${container_tags[@]}"; do
docker pull $tag-amd64
docker pull $tag-arm64
done
# for tag in "${container_tags[@]}"; do
# docker pull $tag-amd64
# docker pull $tag-arm64
# done

docker buildx imagetools create \
$(for tag in "${container_tags[@]}"; do echo -n " --tag $tag"; done) \
$container_tag_commit-amd64 \
$container_tag_commit-arm64
$container_tag_commit-arm64 \

0 comments on commit 76dc5c0

Please sign in to comment.