Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Open
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
20 changes: 15 additions & 5 deletions .github/workflows/ci-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ on:
push:
branches-ignore:
- 'release/**'
pull_request:
branches:
- 'master'

jobs:
push-to-ecr:
Expand All @@ -34,6 +31,19 @@ jobs:
with:
fetch-depth: 0
ref: ${{ inputs.commitOrTag }}
- name: Check Pull Request open to the default branch
id: is-pr-open
run: |
pull_requests=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/Zilliqa/Zilliqa/pulls?state=open&per_page=100&base=${{ github.event.repository.default_branch }}&head=${{ github.event.repository.owner.login }}:${{ github.ref_name }}" | jq -r ".[].url")

if [ -n "$pull_requests" ]; then
echo "There is an open pull request from the current feature branch to the default branch"
echo "result=true" >> $GITHUB_OUTPUT
else
echo "There is no open pull request from the current feature branch to the default branch"
echo "result=false" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Configure AWS Credentials
uses: Zilliqa/gh-actions-workflows/actions/configure-aws-credentials@v1
with:
Expand All @@ -52,6 +62,6 @@ jobs:
run: DOCKER_BUILDKIT=1 docker build -t ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/zilliqa:${{ steps.set-tag.outputs.tag }} -f docker/Dockerfile .
shell: bash
- name: Push Docker images
if: github.event_name == 'pull_request' || github.ref_name == 'master'
if: steps.is-pr-open.outputs.result == 'true' || github.ref_name == 'master'
run: docker push ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/zilliqa:${{ steps.set-tag.outputs.tag }}
shell: bash
shell: bash