Skip to content

Commit

Permalink
Use explicit values instead of anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed Jan 18, 2024
1 parent ce37ff1 commit 0400564
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 28 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/bens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/eth-bytecode-db-extractors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/eth-bytecode-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/multichain-search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/sig-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/smart-contract-verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/user-ops-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/visualizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -124,27 +127,31 @@ 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 }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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) || '' }}

0 comments on commit 0400564

Please sign in to comment.