From 0400564d289f4d6ddd97d01d8fb5933633044bae Mon Sep 17 00:00:00 2001 From: Rim Rakhimov Date: Fri, 19 Jan 2024 01:09:21 +0400 Subject: [PATCH] Use explicit values instead of anchors --- .github/workflows/bens.yml | 7 +++-- .../workflows/eth-bytecode-db-extractors.yml | 6 +++-- .github/workflows/eth-bytecode-db.yml | 7 +++-- .github/workflows/libs.yml | 7 +++-- .github/workflows/multichain-search.yml | 6 +++-- .github/workflows/sig-provider.yml | 7 +++-- .github/workflows/smart-contract-verifier.yml | 7 +++-- .github/workflows/stats.yml | 7 +++-- .github/workflows/user-ops-indexer.yml | 7 +++-- .github/workflows/visualizer.yml | 27 ++++++++++++------- 10 files changed, 60 insertions(+), 28 deletions(-) diff --git a/.github/workflows/bens.yml b/.github/workflows/bens.yml index f231fd0b4..c9d0f1b87 100644 --- a/.github/workflows/bens.yml +++ b/.github/workflows/bens.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'bens/v*' - paths: &paths + paths: - blockscout-ens/** - .github/workflows/bens.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - blockscout-ens/** + - .github/workflows/bens.yml + - .github/actions/deps/** name: Test, lint and docker (bens) diff --git a/.github/workflows/eth-bytecode-db-extractors.yml b/.github/workflows/eth-bytecode-db-extractors.yml index 7b607b10d..4facf0e34 100644 --- a/.github/workflows/eth-bytecode-db-extractors.yml +++ b/.github/workflows/eth-bytecode-db-extractors.yml @@ -2,11 +2,13 @@ on: push: branches: - 'main' - paths: &paths + paths: - eth-bytecode-db-extractors/** - .github/workflows/eth-bytecode-db-extractors.yml pull_request: - paths: *paths + paths: + - eth-bytecode-db-extractors/** + - .github/workflows/eth-bytecode-db-extractors.yml name: Lint (eth-bytecode-db-extractors) diff --git a/.github/workflows/eth-bytecode-db.yml b/.github/workflows/eth-bytecode-db.yml index cfec050e8..61be3aa51 100644 --- a/.github/workflows/eth-bytecode-db.yml +++ b/.github/workflows/eth-bytecode-db.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'eth-bytecode-db/v*' - paths: &paths + paths: - eth-bytecode-db/** - .github/workflows/eth-bytecode-db.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - eth-bytecode-db/** + - .github/workflows/eth-bytecode-db.yml + - .github/actions/deps/** name: Test, lint and docker (eth-bytecode-db) diff --git a/.github/workflows/libs.yml b/.github/workflows/libs.yml index 2b00f1898..139450aaf 100644 --- a/.github/workflows/libs.yml +++ b/.github/workflows/libs.yml @@ -2,12 +2,15 @@ on: push: branches: - 'main' - paths: &paths + paths: - libs/** - .github/workflows/libs.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - libs/** + - .github/workflows/libs.yml + - .github/actions/deps/** name: Test, lint (libs) diff --git a/.github/workflows/multichain-search.yml b/.github/workflows/multichain-search.yml index 4e7024d8e..af6945922 100644 --- a/.github/workflows/multichain-search.yml +++ b/.github/workflows/multichain-search.yml @@ -4,11 +4,13 @@ on: - 'main' tags: - 'multichain-search/v*' - paths: &paths + paths: - multichain-search/** - .github/workflows/multichain-search.yml pull_request: - paths: *paths + paths: + - multichain-search/** + - .github/workflows/multichain-search.yml name: Test, lint and docker (multichain-search) diff --git a/.github/workflows/sig-provider.yml b/.github/workflows/sig-provider.yml index bc91547b8..c63c45176 100644 --- a/.github/workflows/sig-provider.yml +++ b/.github/workflows/sig-provider.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'sig-provider/v*' - paths: &paths + paths: - sig-provider/** - .github/workflows/sig-provider.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - sig-provider/** + - .github/workflows/sig-provider.yml + - .github/actions/deps/** name: Test, lint and docker (sig-provider) diff --git a/.github/workflows/smart-contract-verifier.yml b/.github/workflows/smart-contract-verifier.yml index 292fb5f36..84073be94 100644 --- a/.github/workflows/smart-contract-verifier.yml +++ b/.github/workflows/smart-contract-verifier.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'smart-contract-verifier/v*' - paths: &paths + paths: - smart-contract-verifier/** - .github/workflows/smart-contract-verifier.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - smart-contract-verifier/** + - .github/workflows/smart-contract-verifier.yml + - .github/actions/deps/** name: Test, lint and docker (smart-contract-verifier) diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index fddc528d4..6242a1a0d 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'stats/v*' - paths: &paths + paths: - stats/** - .github/workflows/stats.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - stats/** + - .github/workflows/stats.yml + - .github/actions/deps/** name: Test, lint and docker (stats) diff --git a/.github/workflows/user-ops-indexer.yml b/.github/workflows/user-ops-indexer.yml index 8f593074c..84155ebe7 100644 --- a/.github/workflows/user-ops-indexer.yml +++ b/.github/workflows/user-ops-indexer.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'user-ops-indexer/v*' - paths: &paths + paths: - user-ops-indexer/** - .github/workflows/user-ops-indexer.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - user-ops-indexer/** + - .github/workflows/user-ops-indexer.yml + - .github/actions/deps/** name: Test, lint and docker (user-ops-indexer) diff --git a/.github/workflows/visualizer.yml b/.github/workflows/visualizer.yml index 1b4296a8d..68754db5b 100644 --- a/.github/workflows/visualizer.yml +++ b/.github/workflows/visualizer.yml @@ -4,12 +4,15 @@ on: - 'main' tags: - 'visualizer/v*' - paths: &paths + paths: - visualizer/** - .github/workflows/visualizer.yml - .github/actions/deps/** pull_request: - paths: *paths + paths: + - visualizer/** + - .github/workflows/visualizer.yml + - .github/actions/deps/** name: Test, lint and docker (visualizer) @@ -27,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install deps uses: ./.github/actions/deps @@ -71,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install deps uses: ./.github/actions/deps @@ -104,11 +107,11 @@ jobs: always() && (needs.test.result == 'success' || needs.test.result == 'cancelled') && (needs.lint.result == 'success' || needs.lint.result == 'cancelled') - timeout-minutes: 30 + timeout-minutes: 300 runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: actions-ecosystem/action-regex-match@v2 id: regex @@ -124,7 +127,7 @@ jobs: (if ! [[ "$t" == "" ]]; then echo tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$t, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest; elif ! [[ "$m" == "" ]]; then echo tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$m; else echo tags=; fi) >> $GITHUB_OUTPUT - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -132,19 +135,23 @@ jobs: - name: Extract metadata for Docker id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: "visualizer" file: "visualizer/Dockerfile" push: ${{ steps.tags_extractor.outputs.tags != '' }} tags: ${{ steps.tags_extractor.outputs.tags }} + platforms: | + linux/amd64 + linux/arm64/v8 labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:build-cache cache-to: ${{ github.ref == 'refs/heads/main' && format('type=registry,ref={0}/{1}:build-cache,mode=max', env.REGISTRY, env.IMAGE_NAME) || '' }} +