Skip to content

Commit

Permalink
Use token
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Jan 18, 2024
1 parent c386ec5 commit 0afe0d6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
# TODO: Remove after when we can upgrade hardhat-plugins
- name: pre-download compiilers
run: |
curl -s https://api.github.com/repos/matter-labs/era-solidity/releases?per_page=200
# Download needed versions of vyper compiler
# Not sanitized due to unconventional path and tags
mkdir -p ./hardhat-nodejs/compilers-v2/vyper/linux
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
GITHUB_TOKEN:
description: "GITHUB_TOKEN"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand All @@ -23,6 +26,7 @@ jobs:
name: Build and Push Docker Images
env:
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ${{ fromJSON('["matterlabs-ci-runner", "matterlabs-ci-runner-arm"]')[contains(matrix.platforms, 'arm')] }}
strategy:
matrix:
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
run: |
ci_run rustup default nightly-2023-08-21
platform=$(echo $PLATFORM | tr '/' '-')
ci_run zk docker $DOCKER_ACTION --custom-tag=${IMAGE_TAG_SUFFIX} --platform=${PLATFORM} $COMPONENT
PASSED_ENV_VARS=GITHUB_TOKEN ci_run zk docker $DOCKER_ACTION --custom-tag=${IMAGE_TAG_SUFFIX} --platform=${PLATFORM} $COMPONENT
- name: Show sccache stats
if: always()
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-prover-images:
name: Build prover images
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-test-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-push-prover-images:
name: Build and push images
Expand Down
2 changes: 0 additions & 2 deletions docker/contract-verifier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ RUN cargo build --release
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y curl libpq5 ca-certificates wget python3 jq && rm -rf /var/lib/apt/lists/*
RUN curl -s https://api.github.com/repos/matter-labs/era-solidity/releases?per_page=200
RUN curl -s https://api.github.com/repos/matter-labs/era-solidity/releases?per_page=200 | jq -r '.[].tag_name'

# install zksolc 1.3.x
RUN skip_versions="v1.3.12 v1.3.15 v1.3.20" && \
Expand Down
4 changes: 3 additions & 1 deletion docker/contract-verifier/install-all-solc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set -e

# Installs all solc versions from the github repo
wget -O list.txt https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/list.txt

Expand All @@ -20,7 +22,7 @@ do
done

# Download zkVM solc
for version in $(curl -s https://api.github.com/repos/matter-labs/era-solidity/releases?per_page=200 | jq -r '.[].tag_name')
for version in $(curl -s --request GET --url "https://api.github.com/repos/matter-labs/era-solidity/releases?per_page=200" --header "Authorization: Bearer $GITHUB_TOKEN" | jq -r '.[].tag_name')
do
mkdir -p etc/solc-bin/zkVM-$version/
wget https://github.com/matter-labs/era-solidity/releases/download/$version/solc-linux-amd64-$version -O etc/solc-bin/zkVM-$version/solc
Expand Down

0 comments on commit 0afe0d6

Please sign in to comment.