Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: allow to push new versions of the zkevm-contracts images #404

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/docker-image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,23 @@ jobs:
id: determine_tag
run: |
TAG=${{ github.event.inputs.zkevm_contracts_version }}
if [[ $TAG == *pp ]]; then
if [[ $TAG == *-fork.10 ]]; then
# Custom rule to label fork10 tags as fork11.
FULL_TAG="${TAG%-fork.10}-fork.11"
elif [[ $TAG == *pp ]]; then
# Custom rule to label pp tags as fork12.
FULL_TAG="${TAG}-fork.12"
elif [[ $TAG != *-fork.[0-9]* ]]; then
# Custom rule to label undefined tags as fork13.
FULL_TAG="${TAG}-fork.13"
else
FULL_TAG=$TAG
fi
echo "full_tag=$FULL_TAG" >> $GITHUB_OUTPUT

- name: Check if image already exists
id: check_image
run: |
if docker manifest inspect ${{ env.IMAGE_NAME }}:${{ steps.determine_tag.outputs.full_tag }} > /dev/null 2>&1; then
echo "Image already exists, skipping build."
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "Image does not exist."
echo "exists=false" >> $GITHUB_OUTPUT
fi

# We don't check if the image already exists to be able to push new versions of the images
# in case of a dependency breaking change (e.g. foundry).
- name: Build image and push to the Docker Hub
if: ${{ steps.check_image.outputs.exists == 'false' }}
uses: docker/build-push-action@v6
with:
context: docker
Expand Down
Loading