From 805a0ac4a7e4d902445b1a4f6296be25b3445e2b Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Mon, 26 Jun 2023 15:17:44 +0100 Subject: [PATCH 1/8] Revert "api-server: listen on 127.0.0.1 instead of 0.0.0.0" This reverts commit 238b6b97cebc5fb5fc4b2711b5d8d38b9bac2c34. --- backend/crates/api-server/src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/crates/api-server/src/main.rs b/backend/crates/api-server/src/main.rs index ac324c3..aa99a99 100644 --- a/backend/crates/api-server/src/main.rs +++ b/backend/crates/api-server/src/main.rs @@ -5,7 +5,7 @@ use async_graphql::{ use async_graphql_warp::{self, GraphQLResponse}; use clap::Parser; use graphix_common::{api_types as schema, store::Store}; -use std::{convert::Infallible, net::Ipv4Addr}; +use std::convert::Infallible; use warp::{ http::{self, Method}, Filter, @@ -59,9 +59,7 @@ async fn run_api_server(options: CliOptions, store: Store) { .or(graphql_playground_route) .or(graphql_route); - warp::serve(routes) - .run((Ipv4Addr::LOCALHOST, options.port)) - .await; + warp::serve(routes).run(([0, 0, 0, 0], options.port)).await; } fn init_tracing() { From 384d519291d02220203a48025ce62289a6c17cc6 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Wed, 19 Jul 2023 11:54:27 +0100 Subject: [PATCH 2/8] small fixes and refactor --- backend/crates/common/src/indexer/real_indexer.rs | 10 +++++++--- backend/crates/common/src/network_subgraph.rs | 1 - backend/crates/common/src/queries.rs | 14 +++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/backend/crates/common/src/indexer/real_indexer.rs b/backend/crates/common/src/indexer/real_indexer.rs index b4135ef..9e84a0f 100644 --- a/backend/crates/common/src/indexer/real_indexer.rs +++ b/backend/crates/common/src/indexer/real_indexer.rs @@ -148,9 +148,13 @@ impl Indexer for RealIndexer { ) -> Vec { let mut pois = vec![]; - // Graph Node implements a limit of 10 POI requests per request, so - // split our requests up accordingly. - for requests in requests.chunks(10) { + // Graph Node implements a limit of 10 POI requests per request, so split our requests up + // accordingly. + // + // FIXME: This is temporarily set to 1 until we fix the error: 'Null value resolved for + // non-null field `proofOfIndexing`' Which is probably a Graph Node bug. Setting it to 1 + // reduces the impact of this issue. + for requests in requests.chunks(1) { trace!( indexer = %self.id(), batch_size = requests.len(), diff --git a/backend/crates/common/src/network_subgraph.rs b/backend/crates/common/src/network_subgraph.rs index 726e731..fd299aa 100644 --- a/backend/crates/common/src/network_subgraph.rs +++ b/backend/crates/common/src/network_subgraph.rs @@ -69,7 +69,6 @@ impl NetworkSubgraph { &self, address: &[u8], ) -> anyhow::Result> { - println!("address is {:?}", hex::encode(address)); let request = GraphqlRequest { query: Self::INDEXER_BY_ADDRESS_QUERY.to_string(), variables: BTreeMap::from_iter(vec![( diff --git a/backend/crates/common/src/queries.rs b/backend/crates/common/src/queries.rs index 5a4f5f8..b6bb662 100644 --- a/backend/crates/common/src/queries.rs +++ b/backend/crates/common/src/queries.rs @@ -103,16 +103,16 @@ pub async fn query_proofs_of_indexing( })); // For each deployment, identify the latest block number that all indexers have in common - let latest_blocks: HashMap> = + let latest_blocks: HashMap> = HashMap::from_iter(deployments.iter().map(|deployment| { ( deployment.clone(), statuses_by_deployment.get(deployment).and_then(|statuses| { statuses .iter() - .map(|status| &status.latest_block) - .min_by_key(|block| block.number) - .cloned() + .map(|status| &status.latest_block.number) + .min() + .copied() }), ) })); @@ -130,10 +130,10 @@ pub async fn query_proofs_of_indexing( .iter() .any(|status| status.indexer.eq(indexer)) }) - .filter_map(|(deployment, block)| { - block.clone().map(|block| PoiRequest { + .filter_map(|(deployment, block_number)| { + block_number.map(|block_number| PoiRequest { deployment: deployment.clone(), - block_number: block.number, + block_number: block_number, }) }) .collect::>(); From 0de6f7400a8d4515f931368c09bc7956cabdc4a6 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Wed, 19 Jul 2023 12:13:48 +0100 Subject: [PATCH 3/8] fix warning --- backend/crates/common/src/queries.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/crates/common/src/queries.rs b/backend/crates/common/src/queries.rs index b6bb662..7721c0a 100644 --- a/backend/crates/common/src/queries.rs +++ b/backend/crates/common/src/queries.rs @@ -1,7 +1,5 @@ use crate::indexer::Indexer; -use crate::prelude::{ - BlockPointer, IndexingStatus, PoiRequest, ProofOfIndexing, SubgraphDeployment, -}; +use crate::prelude::{IndexingStatus, PoiRequest, ProofOfIndexing, SubgraphDeployment}; use crate::prometheus_metrics::metrics; use futures::stream::FuturesUnordered; use futures::StreamExt; From 5d2e38aec00c4253608c2c63ce566078ca5b06fc Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Wed, 19 Jul 2023 12:35:03 +0100 Subject: [PATCH 4/8] request the earliest block in the IndexingStatus --- .../graphql/indexer/queries/indexing-statuses.gql | 3 +++ backend/crates/common/src/indexer/interceptor.rs | 1 + backend/crates/common/src/indexer/real_indexer.rs | 14 ++++++++------ backend/crates/common/src/tests/gen.rs | 1 + backend/crates/common/src/tests/mocks.rs | 2 ++ backend/crates/common/src/types.rs | 1 + 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/backend/crates/common/graphql/indexer/queries/indexing-statuses.gql b/backend/crates/common/graphql/indexer/queries/indexing-statuses.gql index c3724bd..adcb688 100644 --- a/backend/crates/common/graphql/indexer/queries/indexing-statuses.gql +++ b/backend/crates/common/graphql/indexer/queries/indexing-statuses.gql @@ -9,6 +9,9 @@ query IndexingStatuses { number hash } + earliestBlock { + number + } } } } diff --git a/backend/crates/common/src/indexer/interceptor.rs b/backend/crates/common/src/indexer/interceptor.rs index cce5bdf..207880b 100644 --- a/backend/crates/common/src/indexer/interceptor.rs +++ b/backend/crates/common/src/indexer/interceptor.rs @@ -50,6 +50,7 @@ impl Indexer for IndexerInterceptor { deployment: status.deployment, network: status.network, latest_block: status.latest_block, + earliest_block_num: status.earliest_block_num, }) .collect(); Ok(hijacked_statuses) diff --git a/backend/crates/common/src/indexer/real_indexer.rs b/backend/crates/common/src/indexer/real_indexer.rs index 9e84a0f..71b021b 100644 --- a/backend/crates/common/src/indexer/real_indexer.rs +++ b/backend/crates/common/src/indexer/real_indexer.rs @@ -306,18 +306,19 @@ mod gql_types { .get(0) .ok_or_else(|| anyhow!("chain status missing"))?; - let latest_block = match chain.on { + let (latest_block, earliest_block_num) = match &chain.on { indexing_statuses::IndexingStatusesIndexingStatusesChainsOn::EthereumIndexingStatus( indexing_statuses::IndexingStatusesIndexingStatusesChainsOnEthereumIndexingStatus { - ref latest_block, + latest_block, + earliest_block, .. }, - ) => match latest_block { - Some(block) => BlockPointer { + ) => match (latest_block, earliest_block) { + (Some(block), Some(earliest_block)) => (BlockPointer { number: block.number.parse()?, hash: Some(block.hash.clone().as_str().try_into()?), - }, - None => { + }, earliest_block.number.parse()?), + _ => { return Err(anyhow!("deployment has not started indexing yet")); } }, @@ -328,6 +329,7 @@ mod gql_types { deployment: SubgraphDeployment(self.inner.subgraph), network: chain.network.clone(), latest_block, + earliest_block_num, }) } } diff --git a/backend/crates/common/src/tests/gen.rs b/backend/crates/common/src/tests/gen.rs index 4bbf724..f90e7ac 100644 --- a/backend/crates/common/src/tests/gen.rs +++ b/backend/crates/common/src/tests/gen.rs @@ -87,6 +87,7 @@ where network: "mainnet".into(), latest_block: blocks.iter().choose(&mut rng).unwrap().clone(), canonical_pois: gen_pois(blocks.clone(), &mut rng), + earliest_block_num: blocks[0].number, }) .collect(); diff --git a/backend/crates/common/src/tests/mocks.rs b/backend/crates/common/src/tests/mocks.rs index ce572b4..278b971 100644 --- a/backend/crates/common/src/tests/mocks.rs +++ b/backend/crates/common/src/tests/mocks.rs @@ -13,6 +13,7 @@ pub struct DeploymentDetails { pub network: String, pub latest_block: BlockPointer, pub canonical_pois: Vec, + pub earliest_block_num: u64, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -45,6 +46,7 @@ impl Indexer for MockIndexer { deployment: details.deployment, network: details.network, latest_block: details.latest_block, + earliest_block_num: details.earliest_block_num, }) .collect()) } diff --git a/backend/crates/common/src/types.rs b/backend/crates/common/src/types.rs index c9573b2..b128e0f 100644 --- a/backend/crates/common/src/types.rs +++ b/backend/crates/common/src/types.rs @@ -39,6 +39,7 @@ pub struct IndexingStatus { pub deployment: SubgraphDeployment, pub network: String, pub latest_block: BlockPointer, + pub earliest_block_num: u64, } impl PartialEq for IndexingStatus { From 18caa107ab4d06c362a0f2ee85164f825b53e6a2 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Wed, 19 Jul 2023 13:12:50 +0100 Subject: [PATCH 5/8] Introduce BlockChoicePolicy --- backend/crates/common/src/block_choice.rs | 24 +++++++++++++++++++ backend/crates/common/src/lib.rs | 1 + backend/crates/common/src/queries.rs | 8 +++---- backend/crates/common/src/store/tests.rs | 4 +++- backend/crates/cross-checker/src/main.rs | 3 ++- .../src/tests/proofs_of_indexing.rs | 4 +++- 6 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 backend/crates/common/src/block_choice.rs diff --git a/backend/crates/common/src/block_choice.rs b/backend/crates/common/src/block_choice.rs new file mode 100644 index 0000000..acf23cf --- /dev/null +++ b/backend/crates/common/src/block_choice.rs @@ -0,0 +1,24 @@ +use crate::prelude::IndexingStatus; + +#[derive(Copy, Clone, Debug)] +pub enum BlockChoicePolicy { + // Use the earliest block that all indexers have in common + Earliest, + // Use the block that maximizes the total number of blocks synced across all indexers + // MaxSyncedBlocks, +} + +impl BlockChoicePolicy { + pub fn choose_block<'a>( + &self, + statuses: impl Iterator, + ) -> Option { + match self { + BlockChoicePolicy::Earliest => statuses + .map(|status| &status.latest_block.number) + .min() + .copied(), + // BlockChoicePolicy::MaxSyncedBlocks => {} + } + } +} diff --git a/backend/crates/common/src/lib.rs b/backend/crates/common/src/lib.rs index 9dcc63b..87bdd42 100644 --- a/backend/crates/common/src/lib.rs +++ b/backend/crates/common/src/lib.rs @@ -1,4 +1,5 @@ pub mod api_types; +pub mod block_choice; pub mod config; mod indexer; pub mod network_subgraph; diff --git a/backend/crates/common/src/queries.rs b/backend/crates/common/src/queries.rs index 7721c0a..28bd416 100644 --- a/backend/crates/common/src/queries.rs +++ b/backend/crates/common/src/queries.rs @@ -1,3 +1,4 @@ +use crate::block_choice::BlockChoicePolicy; use crate::indexer::Indexer; use crate::prelude::{IndexingStatus, PoiRequest, ProofOfIndexing, SubgraphDeployment}; use crate::prometheus_metrics::metrics; @@ -72,6 +73,7 @@ pub async fn query_indexing_statuses(indexers: Vec>) -> Vec, + block_choice_policy: BlockChoicePolicy, ) -> Vec { info!("Query POIs for recent common blocks across indexers"); @@ -106,11 +108,7 @@ pub async fn query_proofs_of_indexing( ( deployment.clone(), statuses_by_deployment.get(deployment).and_then(|statuses| { - statuses - .iter() - .map(|status| &status.latest_block.number) - .min() - .copied() + block_choice_policy.choose_block(statuses.iter().map(|&s| s)) }), ) })); diff --git a/backend/crates/common/src/store/tests.rs b/backend/crates/common/src/store/tests.rs index 65ca9af..337e56d 100644 --- a/backend/crates/common/src/store/tests.rs +++ b/backend/crates/common/src/store/tests.rs @@ -1,3 +1,4 @@ +use crate::block_choice::BlockChoicePolicy; use crate::tests::{fast_rng, gen::gen_indexers}; use crate::{ queries, @@ -16,7 +17,8 @@ async fn poi_db_roundtrip() { let indexers = gen_indexers(&mut rng, 100); let indexing_statuses = queries::query_indexing_statuses(indexers).await; - let pois = queries::query_proofs_of_indexing(indexing_statuses).await; + let pois = + queries::query_proofs_of_indexing(indexing_statuses, BlockChoicePolicy::Earliest).await; let store = Store::new(&test_db_url()).await.unwrap(); let mut conn = store.test_conn(); diff --git a/backend/crates/cross-checker/src/main.rs b/backend/crates/cross-checker/src/main.rs index 894a7c6..f177909 100644 --- a/backend/crates/cross-checker/src/main.rs +++ b/backend/crates/cross-checker/src/main.rs @@ -6,6 +6,7 @@ mod tests; use anyhow::Context; use clap::Parser; use graphix_common::api_types::DivergenceInvestigationRequestWithUuid; +use graphix_common::block_choice::BlockChoicePolicy; use graphix_common::prelude::{BlockPointer, Config, Indexer, ProofOfIndexing, SubgraphDeployment}; use graphix_common::queries::{query_indexing_statuses, query_proofs_of_indexing}; use graphix_common::PrometheusExporter; @@ -56,7 +57,7 @@ async fn main() -> anyhow::Result<()> { let indexing_statuses = query_indexing_statuses(indexers).await; info!("Monitor proofs of indexing"); - let pois = query_proofs_of_indexing(indexing_statuses).await; + let pois = query_proofs_of_indexing(indexing_statuses, BlockChoicePolicy::Earliest).await; let write_err = store.write_pois(&pois, store::PoiLiveness::Live).err(); if let Some(err) = write_err { diff --git a/backend/crates/cross-checker/src/tests/proofs_of_indexing.rs b/backend/crates/cross-checker/src/tests/proofs_of_indexing.rs index 62e1f27..61b30bf 100644 --- a/backend/crates/cross-checker/src/tests/proofs_of_indexing.rs +++ b/backend/crates/cross-checker/src/tests/proofs_of_indexing.rs @@ -1,3 +1,4 @@ +use graphix_common::block_choice::BlockChoicePolicy; use graphix_common::queries; use graphix_common::tests::{fast_rng, gen::gen_indexers}; use itertools::Itertools; @@ -12,7 +13,8 @@ async fn proofs_of_indexing() { let indexers = gen_indexers(&mut rng, max_indexers as usize); let indexing_statuses = queries::query_indexing_statuses(indexers).await; - let pois = queries::query_proofs_of_indexing(indexing_statuses); + let pois = + queries::query_proofs_of_indexing(indexing_statuses, BlockChoicePolicy::Earliest); let actual_pois = pois.await.into_iter().collect::>(); From d4aab0010eefd565ddfde8f25c4d2e14c83ab0a6 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Wed, 19 Jul 2023 18:44:40 +0100 Subject: [PATCH 6/8] Add MaxSyncedBlocks block policy and make it the default --- backend/crates/common/src/block_choice.rs | 43 +++++++++++++++++++++-- backend/crates/common/src/config.rs | 4 +++ backend/crates/common/src/queries.rs | 9 +++-- backend/crates/cross-checker/src/main.rs | 3 +- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/backend/crates/common/src/block_choice.rs b/backend/crates/common/src/block_choice.rs index acf23cf..47faba5 100644 --- a/backend/crates/common/src/block_choice.rs +++ b/backend/crates/common/src/block_choice.rs @@ -1,11 +1,19 @@ use crate::prelude::IndexingStatus; +use serde::Deserialize; -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Deserialize)] +#[serde(rename_all = "camelCase")] pub enum BlockChoicePolicy { // Use the earliest block that all indexers have in common Earliest, // Use the block that maximizes the total number of blocks synced across all indexers - // MaxSyncedBlocks, + MaxSyncedBlocks, +} + +impl Default for BlockChoicePolicy { + fn default() -> Self { + BlockChoicePolicy::MaxSyncedBlocks + } } impl BlockChoicePolicy { @@ -18,7 +26,36 @@ impl BlockChoicePolicy { .map(|status| &status.latest_block.number) .min() .copied(), - // BlockChoicePolicy::MaxSyncedBlocks => {} + BlockChoicePolicy::MaxSyncedBlocks => { + // Assuming that all statuses have the same `deployment` and `earliest_block_num`, + // this will return the block number that maximizes the total number of blocks + // synced across all indexers. + + let mut indexers_ascending: Vec<&'a IndexingStatus> = statuses.collect(); + indexers_ascending.sort_by_key(|status| status.latest_block.number); + + let mut max_utility = 0; + let mut best_block: Option = None; + + for (i, status) in indexers_ascending.iter().enumerate() { + let remaining_statuses = indexers_ascending.len() - i; + let block_number = status.latest_block.number; + if block_number < status.earliest_block_num { + // This status is inconsistent, ignore it, avoiding overflow. + continue; + } + + let utility = + remaining_statuses as u64 * (block_number - status.earliest_block_num); + + if utility > max_utility { + max_utility = utility; + best_block = Some(block_number); + } + } + + best_block + } } } } diff --git a/backend/crates/common/src/config.rs b/backend/crates/common/src/config.rs index f2eea78..8ef969b 100644 --- a/backend/crates/common/src/config.rs +++ b/backend/crates/common/src/config.rs @@ -4,6 +4,7 @@ use std::{fs::File, path::Path, sync::Arc}; use tracing::info; use crate::{ + block_choice::BlockChoicePolicy, indexer::{Indexer, IndexerInterceptor, RealIndexer}, network_subgraph::NetworkSubgraph, }; @@ -13,6 +14,9 @@ use crate::{ pub struct Config { pub database_url: String, pub sources: Vec, + #[serde(default)] + pub block_choice_policy: BlockChoicePolicy, + #[serde(default = "Config::default_polling_period_in_seconds")] pub polling_period_in_seconds: u64, } diff --git a/backend/crates/common/src/queries.rs b/backend/crates/common/src/queries.rs index 28bd416..fb42626 100644 --- a/backend/crates/common/src/queries.rs +++ b/backend/crates/common/src/queries.rs @@ -102,7 +102,7 @@ pub async fn query_proofs_of_indexing( ) })); - // For each deployment, identify the latest block number that all indexers have in common + // For each deployment, chooose a block on which to query the PoI let latest_blocks: HashMap> = HashMap::from_iter(deployments.iter().map(|deployment| { ( @@ -119,12 +119,15 @@ pub async fn query_proofs_of_indexing( .map(|indexer| async { let poi_requests = latest_blocks .iter() - .filter(|(deployment, _)| { + .filter(|(deployment, &block_number)| { statuses_by_deployment .get(*deployment) .expect("bug in matching deployments to latest blocks and indexers") .iter() - .any(|status| status.indexer.eq(indexer)) + .any(|status| { + status.indexer.eq(indexer) + && Some(status.latest_block.number) >= block_number + }) }) .filter_map(|(deployment, block_number)| { block_number.map(|block_number| PoiRequest { diff --git a/backend/crates/cross-checker/src/main.rs b/backend/crates/cross-checker/src/main.rs index f177909..68483c5 100644 --- a/backend/crates/cross-checker/src/main.rs +++ b/backend/crates/cross-checker/src/main.rs @@ -6,7 +6,6 @@ mod tests; use anyhow::Context; use clap::Parser; use graphix_common::api_types::DivergenceInvestigationRequestWithUuid; -use graphix_common::block_choice::BlockChoicePolicy; use graphix_common::prelude::{BlockPointer, Config, Indexer, ProofOfIndexing, SubgraphDeployment}; use graphix_common::queries::{query_indexing_statuses, query_proofs_of_indexing}; use graphix_common::PrometheusExporter; @@ -57,7 +56,7 @@ async fn main() -> anyhow::Result<()> { let indexing_statuses = query_indexing_statuses(indexers).await; info!("Monitor proofs of indexing"); - let pois = query_proofs_of_indexing(indexing_statuses, BlockChoicePolicy::Earliest).await; + let pois = query_proofs_of_indexing(indexing_statuses, config.block_choice_policy).await; let write_err = store.write_pois(&pois, store::PoiLiveness::Live).err(); if let Some(err) = write_err { From 2cac827a51d3256029ef9d53146a46704c78bdfe Mon Sep 17 00:00:00 2001 From: Filippo Neysofu Costa Date: Fri, 21 Jul 2023 10:58:12 +0200 Subject: [PATCH 7/8] Publish Docker images to GHCR (#73) * Publish Docker images to GHCR * Only run on `main` --- .github/workflows/ci.yml | 50 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e38e6ae..d600e0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: full + REGISTRY: ghcr.io jobs: rustfmt: @@ -27,48 +28,45 @@ jobs: toolchain: ${{ matrix.rust }} components: rustfmt override: true - - name: Check formating + - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - docker-api-server: + docker-build-and-push: runs-on: ubuntu-latest + permissions: + contents: read + packages: write + if: github.ref == 'refs/heads/main' steps: + - name: Checkout repository + uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - #- name: Login to Docker Hub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: docker build + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push API server Docker image uses: docker/build-push-action@v4 with: - push: false - tags: edgeandnode/graphix-api-server:latest + context: . file: ops/api-server.dockerfile - docker-cross-checker: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - #- name: Login to Docker Hub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: docker build + push: true + tags: ghcr.io/${{ github.actor }}/graphix-api-server:latest + - name: Build and push cross-checker service Docker image uses: docker/build-push-action@v4 with: - push: false - tags: edgeandnode/graphix-cross-checker:latest - file: ops/cross-checker.dockerfile + context: . + file: ops/api-server.dockerfile + push: true + tags: ghcr.io/${{ github.actor }}/graphix-cross-checker:latest build: name: Build From 26efba64cf6429c8ed461151c92e048634b67f88 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Fri, 21 Jul 2023 11:23:49 +0200 Subject: [PATCH 8/8] Fix ghcr tag --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d600e0c..45243eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,14 +59,14 @@ jobs: context: . file: ops/api-server.dockerfile push: true - tags: ghcr.io/${{ github.actor }}/graphix-api-server:latest + tags: ghcr.io/${{ github.repository_owner }}/graphix-api-server:latest - name: Build and push cross-checker service Docker image uses: docker/build-push-action@v4 with: context: . file: ops/api-server.dockerfile push: true - tags: ghcr.io/${{ github.actor }}/graphix-cross-checker:latest + tags: ghcr.io/${{ github.repository_owner }}/graphix-cross-checker:latest build: name: Build