Skip to content

Commit

Permalink
Merge branch 'main' into dan/prefund_container_fix_k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
skylenet authored Oct 31, 2024
2 parents b46e224 + b1f27c6 commit 507e6c5
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 21 deletions.
46 changes: 46 additions & 0 deletions .github/actions/docker-login/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docker login
descritpion: Log in to Docker Hub
inputs:
username:
required: true
password:
required: true
runs:
using: composite
steps:
- name: Check for Docker Hub credentials
shell: bash
env:
DOCKER_USERNAME: ${{ inputs.username }}
DOCKER_PASSWORD: ${{ inputs.password }}
run: |
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ]; then
echo "AUTH_EXISTS=false" >> $GITHUB_ENV
echo "No credentials provided"
else
echo "AUTH_EXISTS=true" >> $GITHUB_ENV
echo "Credentials provided"
fi
- name: Login to Docker Hub
if: env.AUTH_EXISTS == 'true'
uses: docker/login-action@v3
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}

- name: Check Docker Hub Rate Limits
shell: bash
env:
DOCKER_USERNAME: ${{ inputs.username }}
DOCKER_PASSWORD: ${{ inputs.password }}
run: |
if [ "$AUTH_EXISTS" = "true" ]; then
echo "Authenticated."
TOKEN=$(curl -s --user "${DOCKER_USERNAME}:${DOCKER_PASSWORD}" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
else
echo "Unauthenticated."
TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
fi
echo "Rate limits:"
curl -s --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest 2>&1 | grep ratelimit
14 changes: 6 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
uses: ./.github/actions/kurtosis-install

Expand Down Expand Up @@ -64,13 +63,12 @@ jobs:
assertoor-mix-assert:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Kurtosis Assertoor GitHub Action
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/per-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ jobs:
run_starlark:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
uses: ./.github/actions/kurtosis-install
- name: Run Starlark
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
kurtosis run ${{ github.workspace }} --args-file network_params.yaml
run_with_args:
Expand All @@ -40,13 +38,12 @@ jobs:
]
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
uses: ./.github/actions/kurtosis-install
- name: Run Starlark
Expand All @@ -68,13 +65,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Kurtosis Assertoor GitHub Action
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,6 @@ VOLUME_SIZE = {
"grandine_volume_size": 1000, # 1GB
},
}
VOLUME_SIZE["mainnet-shadowfork"] = VOLUME_SIZE["mainnet"]
VOLUME_SIZE["sepolia-shadowfork"] = VOLUME_SIZE["sepolia"]
VOLUME_SIZE["holesky-shadowfork"] = VOLUME_SIZE["holesky"]

0 comments on commit 507e6c5

Please sign in to comment.