Skip to content

Building containers for Object #4173

Building containers for Object

Building containers for Object #4173

name: 📦 Build Push Containers
run-name: Building containers for ${{ github.event.pull_request.head || github.ref_name }}
on:
pull_request:
types:
- labeled
- opened
- synchronize
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
jobs:
read-github-context-object:
runs-on: ubuntu-latest
steps:
# I know this is not pretty (debug information) but it's useful to have this
- name: Read github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "GITHUB_SHA=${GITHUB_SHA}"
echo "INFO: github context object content below"
echo "${GITHUB_CONTEXT}"
build-push-checked-containers:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
uses: ./.github/workflows/build-push-container.yml
name: Build Push Checked Containers
secrets: inherit
strategy:
matrix:
container_name:
- movement-celestia-da-light-node
- movement-celestia-appd
- movement-celestia-bridge
- movement-full-node-setup
- wait-for-celestia-light-node
- movement-full-node
- movement-faucet-service
- movement-tests-e2e-simple-interaction
- movement-indexer
- movement-tests-e2e-followers-consistent
- movement-util
with:
container_name: ${{ matrix.container_name }}
build-push-checked-manifest:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
uses: ./.github/workflows/build-push-manifest.yml
name: Build Push Checked Manifest
needs:
- build-push-checked-containers
secrets: inherit
strategy:
matrix:
container_name:
- movement-celestia-da-light-node
- movement-celestia-appd
- movement-celestia-bridge
- movement-full-node-setup
- wait-for-celestia-light-node
- movement-full-node
- movement-faucet-service
- movement-tests-e2e-simple-interaction
- movement-indexer
- movement-tests-e2e-followers-consistent
- movement-util
with:
container_name: ${{ matrix.container_name }}
container-checks:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
runs-on: buildjet-16vcpu-ubuntu-2204
needs:
- build-push-checked-manifest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Read the commit SHA
id: vars
run: |
commit_hash=$(git rev-parse HEAD | cut -c1-7)
echo CONTAINER_REV=${commit_hash}
echo "CONTAINER_REV=${commit_hash}" >> .env
- name: Display .env file
run: cat .env
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget
- name: Install docker-ce-cli
run: |
sudo apt-get install -y docker-ce-cli
- name: Verify Docker Installation
run: |
docker compose version
docker --version
docker version
- name: Run docker-compose local.setup.test
run: |
nix develop --command bash -c "just container-tests"
# run again to test restarts
# nix develop --command bash -c "just container-tests"
### Unchecked containers
build-push-unchecked-containers:
if: contains(github.event.pull_request.labels.*.name, 'cicd:bridge-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:bridge-containers'
uses: ./.github/workflows/build-push-container.yml
name: Build Push Unchecked Containers
secrets: inherit
strategy:
matrix:
container_name:
- bridge-service
- bridge-setup
- helios
with:
container_name: ${{ matrix.container_name }}
build-push-unchecked-manifest:
uses: ./.github/workflows/build-push-manifest.yml
name: Build Push Unchecked Manifest
needs:
- build-push-unchecked-containers
secrets: inherit
strategy:
matrix:
container_name:
- bridge-service
- bridge-setup
- helios
with:
container_name: ${{ matrix.container_name }}