Files
pezkuwi-sdk/.github/actions/build-push-image/action.yml
T
pezkuwichain 6c036bbe6f fix(ci): use upstream paritytech/zombienet Docker image
Zombienet is a 3rd-party upstream tool — its Docker image should
reference paritytech/zombienet, not pezkuwi/zombienet which doesn't
exist on Docker Hub. This fixes all zombienet test failures caused
by image pull failures.
2026-03-16 15:34:47 +03:00

44 lines
1.4 KiB
YAML

name: "build and push image"
inputs:
dockerfile:
description: "dockerfile to build"
required: true
image-name:
description: "image name (without registry)"
required: true
username:
required: false
default: ""
password:
required: false
default: ""
runs:
using: "composite"
steps:
- name: login to dockerhub
id: login
if: ${{ inputs.username != '' && inputs.password != '' }}
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: build
shell: bash
env:
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.105"
IMAGE_TAG: docker.io/pezkuwi/${{ inputs.image-name }}
run: |
export DOCKER_IMAGES_VERSION=${{ github.event.pull_request.head.sha || 'main' }}
if [[ ${{ github.event_name }} == "merge_group" ]]; then export DOCKER_IMAGES_VERSION="${GITHUB_SHA::8}"; fi
docker build \
--build-arg VCS_REF="${GITHUB_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--build-arg IMAGE_NAME="${{ inputs.image-name }}" \
--build-arg ZOMBIENET_IMAGE="${ZOMBIENET_IMAGE}" \
-t "${{ env.IMAGE_TAG }}:$DOCKER_IMAGES_VERSION" \
-f ${{ inputs.dockerfile }} \
.
docker push "${{ env.IMAGE_TAG }}:$DOCKER_IMAGES_VERSION"