diff --git a/.github/workflows/autofix.yaml b/.github/workflows/autofix.yaml deleted file mode 100644 index 515f04db..00000000 --- a/.github/workflows/autofix.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: autofix.ci -on: - pull_request: - push: - branches: ["develop"] -permissions: - contents: read - -jobs: - autofix: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: "npm" - - - run: npm ci - - run: npx prettier --write . - - - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 75b56e6d..c34576bb 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -12,26 +12,34 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - push_to_registry: - name: Push Docker image to Docker Hub + build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 permissions: id-token: write contents: write packages: write steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@v4 with: submodules: recursive + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Docker Setup Buildx uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - driver-opts: | - image=moby/buildkit:master - name: "Authenticate to Google Cloud" id: google-auth diff --git a/.github/workflows/docker-publish.yaml.orig b/.github/workflows/docker-publish.yaml.orig deleted file mode 100644 index 14049418..00000000 --- a/.github/workflows/docker-publish.yaml.orig +++ /dev/null @@ -1,64 +0,0 @@ -name: Publish Docker image - -on: - push: - branches: - - "develop" - tags: - - "*" - -env: - IMAGE_NAME: ${{ github.repository }} - -jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Docker Setup Buildx - uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - driver-opts: | - image=moby/buildkit:master - - - name: Docker Login - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Docker Metadata action - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otterscan/otterscan - ghcr.io/${{ env.IMAGE_NAME }} - - - name: Build and push Docker images - uses: docker/build-push-action@v6 - with: - context: . - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/docker-publish.yaml.rej b/.github/workflows/docker-publish.yaml.rej deleted file mode 100644 index 07fbe946..00000000 --- a/.github/workflows/docker-publish.yaml.rej +++ /dev/null @@ -1,106 +0,0 @@ ---- .github/workflows/docker-publish.yaml -+++ .github/workflows/docker-publish.yaml -@@ -19,7 +20,11 @@ jobs: - matrix: - platform: - - linux/amd64 -- - linux/arm64 -+ permissions: -+ id-token: write -+ contents: write -+ packages: write -+ - steps: - - name: Prepare - run: | -@@ -71,81 +92,22 @@ jobs: - uses: docker/metadata-action@v5 - with: - images: | -- otterscan/otterscan -- ghcr.io/${{ env.IMAGE_NAME }} -+ zilliqa/otterscan -+ asia-docker.pkg.dev/prj-p-devops-services-tvwmrf63/zilliqa-public/otterscan -+ tags: | -+ type=ref,enable=false,priority=600,prefix=pr-,suffix=,event=pr -+ type=ref,event=branch -+ type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} -+ type=semver,pattern={{raw}} - - - name: Build and push by digest - id: build - uses: docker/build-push-action@v5 - with: - context: . -+ push: true - platforms: ${{ matrix.platform }} -+ tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} -- outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true - cache-from: type=gha - cache-to: type=gha,mode=max -- -- - name: Export digest -- run: | -- mkdir -p /tmp/digests -- digest="${{ steps.build.outputs.digest }}" -- touch "/tmp/digests/${digest#sha256:}" -- -- - name: Upload digest -- uses: actions/upload-artifact@v4 -- with: -- name: digests-${{ env.PLATFORM_PAIR }} -- path: /tmp/digests/* -- if-no-files-found: error -- retention-days: 1 -- -- merge: -- name: Push Docker image to Docker Hub -- runs-on: ubuntu-latest -- needs: -- - build -- permissions: -- contents: read -- packages: write -- -- steps: -- - name: Download digests -- uses: actions/download-artifact@v4 -- with: -- path: /tmp/digests -- pattern: digests-* -- merge-multiple: true -- -- - name: Set up Docker Buildx -- uses: docker/setup-buildx-action@v3 -- -- - name: Docker meta -- id: meta -- uses: docker/metadata-action@v5 -- with: -- images: | -- otterscan/otterscan -- ghcr.io/${{ env.IMAGE_NAME }} -- -- - name: Docker Login -- uses: docker/login-action@v3 -- with: -- registry: ghcr.io -- username: ${{ github.actor }} -- password: ${{ secrets.GITHUB_TOKEN }} -- -- - name: Docker Login -- uses: docker/login-action@v3 -- with: -- username: ${{ secrets.DOCKERHUB_USER }} -- password: ${{ secrets.DOCKERHUB_PASSWORD }} -- -- - name: Create manifest list and push -- working-directory: /tmp/digests -- run: | -- docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ -- $(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *) -- -- - name: Inspect image -- run: | -- docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/end-to-end.yaml b/.github/workflows/end-to-end.yaml index 9e8a83e7..f0da60b8 100644 --- a/.github/workflows/end-to-end.yaml +++ b/.github/workflows/end-to-end.yaml @@ -124,8 +124,8 @@ jobs: sudo apt install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb - name: Download Anvil run: | - wget -O ./foundry.tar.gz https://github.com/foundry-rs/foundry/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz - tar -xzf ./foundry.tar.gz anvil + wget -O ./forge.tar.gz https://github.com/foundry-rs/foundry/releases/download/nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9/foundry_nightly_linux_amd64.tar.gz + tar -xzf ./forge.tar.gz anvil - name: Load devnet config id: load-devnet-config run: |