Skip to content

Commit

Permalink
fix: switch to docker build hub
Browse files Browse the repository at this point in the history
  • Loading branch information
petscheit committed Oct 29, 2024
1 parent 7d917fc commit b287617
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
fi
echo "Changed files: $CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -qE '(tools/|contract_bootloader/|compiled_contracts/|setup.py|requirements.txt|setup.sh|environment.dockerfile)'; then
if echo "$CHANGED_FILES" | grep -qE '(tools/|src/contract_bootloader/|setup.py|requirements.txt|setup.sh|environment.dockerfile)'; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
else
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
Expand All @@ -57,25 +57,33 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create remote builder certificates
if: env.CHANGES_DETECTED == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.BUILDKIT_CA_PEM }}" > ${{ github.workspace }}/client-ca.pem
echo "${{ secrets.BUILDKIT_CERT_PEM }}" > ${{ github.workspace }}/client-cert.pem
echo "${{ secrets.BUILDKIT_KEY_PEM }}" > ${{ github.workspace }}/client-key.pem
# - name: Create remote builder certificates
# if: env.CHANGES_DETECTED == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
# run: |
# echo "${{ secrets.BUILDKIT_CA_PEM }}" > ${{ github.workspace }}/client-ca.pem
# echo "${{ secrets.BUILDKIT_CERT_PEM }}" > ${{ github.workspace }}/client-cert.pem
# echo "${{ secrets.BUILDKIT_KEY_PEM }}" > ${{ github.workspace }}/client-key.pem

# - name: Set up Docker Buildx
# if: env.CHANGES_DETECTED == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
# uses: docker/setup-buildx-action@v3
# with:
# driver: remote
# endpoint: "tcp://buildkit.herodotus.dev:5000"
# driver-opts: |
# cacert=${{ github.workspace }}/client-ca.pem
# cert=${{ github.workspace }}/client-cert.pem
# key=${{ github.workspace }}/client-key.pem
# cleanup: true

- name: Set up Docker Buildx
if: env.CHANGES_DETECTED == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: "tcp://buildkit.herodotus.dev:5000"
driver-opts: |
cacert=${{ github.workspace }}/client-ca.pem
cert=${{ github.workspace }}/client-cert.pem
key=${{ github.workspace }}/client-key.pem
version: "lab:latest"
driver: cloud
endpoint: "dataprocessor/github"
cleanup: true

- name: Bump version
if: env.CHANGES_DETECTED == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
Expand Down
1 change: 1 addition & 0 deletions tools/make/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pysha3
web3==7.4.0
trie
black

0 comments on commit b287617

Please sign in to comment.