agora inbox for [email protected]
help / color / mirror / Atom feed[PATCH v37 01/11] Add a syntax to create Incrementally Maintainable Materialized Views
111+ messages / 2 participants
[nested] [flat]
* [PATCH v37 01/11] Add a syntax to create Incrementally Maintainable Materialized Views
@ 2019-12-20 01:05 Yugo Nagata <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Yugo Nagata @ 2019-12-20 01:05 UTC (permalink / raw)
Allow to create Incrementally Maintainable Materialized View (IMMV)
by using INCREMENTAL option in CREATE MATERIALIZED VIEW command
as follow:
CREATE [INCREMANTAL] MATERIALIZED VIEW xxxxx AS SELECT ....;
---
src/backend/parser/gram.y | 32 +++++++++++++++++++++-----------
src/include/nodes/primnodes.h | 1 +
src/include/parser/kwlist.h | 1 +
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index ff4e1388c55..9a353550c37 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -473,6 +473,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
%type <range> OptTempTableName
%type <into> into_clause create_as_target create_mv_target
+%type <boolean> incremental
%type <defelt> createfunc_opt_item common_func_opt_item dostmt_opt_item
%type <fun_param> func_arg func_arg_with_default table_func_column aggr_arg
@@ -776,7 +777,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
HANDLER HAVING HEADER_P HOLD HOUR_P
IDENTITY_P IF_P IGNORE_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IMPORT_P IN_P INCLUDE
- INCLUDING INCREMENT INDENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
+ INCLUDING INCREMENT INCREMENTAL INDENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
INNER_P INOUT INPUT_P INSENSITIVE INSERT INSTEAD INT_P INTEGER
INTERSECT INTERVAL INTO INVOKER IS ISNULL ISOLATION
@@ -5039,32 +5040,34 @@ opt_with_data:
*****************************************************************************/
CreateMatViewStmt:
- CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data
+ CREATE OptNoLog incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data
{
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
- ctas->query = $7;
- ctas->into = $5;
+ ctas->query = $8;
+ ctas->into = $6;
ctas->objtype = OBJECT_MATVIEW;
ctas->is_select_into = false;
ctas->if_not_exists = false;
/* cram additional flags into the IntoClause */
- $5->rel->relpersistence = $2;
- $5->skipData = !($8);
+ $6->rel->relpersistence = $2;
+ $6->skipData = !($9);
+ $6->ivm = $3;
$$ = (Node *) ctas;
}
- | CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
+ | CREATE OptNoLog incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
{
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
- ctas->query = $10;
- ctas->into = $8;
+ ctas->query = $11;
+ ctas->into = $9;
ctas->objtype = OBJECT_MATVIEW;
ctas->is_select_into = false;
ctas->if_not_exists = true;
/* cram additional flags into the IntoClause */
- $8->rel->relpersistence = $2;
- $8->skipData = !($11);
+ $9->rel->relpersistence = $2;
+ $9->skipData = !($12);
+ $9->ivm = $3;
$$ = (Node *) ctas;
}
;
@@ -5081,9 +5084,14 @@ create_mv_target:
$$->tableSpaceName = $5;
$$->viewQuery = NULL; /* filled at analysis time */
$$->skipData = false; /* might get changed later */
+ $$->ivm = false;
}
;
+incremental: INCREMENTAL { $$ = true; }
+ | /*EMPTY*/ { $$ = false; }
+ ;
+
OptNoLog: UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
@@ -18948,6 +18956,7 @@ unreserved_keyword:
| INCLUDE
| INCLUDING
| INCREMENT
+ | INCREMENTAL
| INDENT
| INDEX
| INDEXES
@@ -19554,6 +19563,7 @@ bare_label_keyword:
| INCLUDE
| INCLUDING
| INCREMENT
+ | INCREMENTAL
| INDENT
| INDEX
| INDEXES
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 7977ee24783..213adeec2e2 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -170,6 +170,7 @@ typedef struct IntoClause
/* materialized view's SELECT query */
struct Query *viewQuery pg_node_attr(query_jumble_ignore);
bool skipData; /* true for WITH NO DATA */
+ bool ivm; /* true for WITH IVM */
} IntoClause;
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 51ead54f015..7849ee7f960 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -216,6 +216,7 @@ PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("incremental", INCREMENTAL, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("indent", INDENT, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, BARE_LABEL)
--
2.43.0
--Multipart=_Fri__29_May_2026_23_14_17_+0900_Te0o73X2VqYK57Gd--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
* [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible
@ 2026-06-04 01:03 Andres Freund <[email protected]>
0 siblings, 0 replies; 111+ messages in thread
From: Andres Freund @ 2026-06-04 01:03 UTC (permalink / raw)
While workflows in new forks are disabled by default, existing forks that pull
new changes into the repository will automatically start running CI. That may
not be desired. There however is no way native to Actions to prevent this.
This commit changes it so that each repository that wants real CI to run needs
to explicitly opt into doing so, by creating the 'PG_CI_ENABLED' repository
variable with the value 1.
To make that less confusing, emit a summary whenever we skip running CI, with
a message explaining how to enable CI.
---
.github/workflows/pg-ci.yml | 33 +++++++++++++++++++++++++++++++++
src/tools/ci/README | 11 ++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml
index 60ea5bacded..eaf32c756e2 100644
--- a/.github/workflows/pg-ci.yml
+++ b/.github/workflows/pg-ci.yml
@@ -133,12 +133,45 @@ env:
jobs:
+ # Job: Warn if not enabled
+ #
+ # Do not run CI unless the repository owner opts in, to avoid resource waste
+ # in all the forks of postgres (new forks have workflows disabled by
+ # default, but old ones don't). Unfortunately there's no explicit way to do
+ # so.
+ #
+ # To make that more visible, emit a summary explaining how CI can be enabled
+ # and how the entire workflow, including this warning, can be disabled.
+ warn-not-enabled:
+ name: Warn if not enabled
+ if: ${{vars.PG_CI_ENABLED != '1'}}
+ runs-on: ubuntu-slim
+ steps:
+ - name: Warn
+ env:
+ MSG: |
+ > [!CAUTION]
+ > CI is not enabled in this repository
+ >
+ > To enable, go to ${{github.server_url}}/${{github.repository}}/settings/variables/actions
+ > and create a new variable named PG_CI_ENABLED, with the value 1.
+ >
+ > To avoid seeing this message over and over, go to
+ > ${{github.server_url}}/${{github.repository}}/actions/workflows/pg-ci.yml
+ > and click on the three dots at the top right and choose "Disable workflow"
+ run: |
+ echo "$MSG" >> "$GITHUB_STEP_SUMMARY"
+
+
# Job: Determine enabled jobs
#
# Parses "ci-os-only: ..." from the commit message and exposes flags
# consumed by the jobs' `if:` conditions.
setup:
name: Determine enabled jobs
+ # Only run if repo owner opted in. If this task is skipped due to the if,
+ # none of it's depending tasks run either.
+ if: ${{vars.PG_CI_ENABLED == '1'}}
runs-on: *linux_runs_on
timeout-minutes: 1
outputs:
diff --git a/src/tools/ci/README b/src/tools/ci/README
index 99e006f7e77..d72cce5b6bc 100644
--- a/src/tools/ci/README
+++ b/src/tools/ci/README
@@ -20,7 +20,7 @@ Configuring CI on personal repositories
Currently postgres contains CI support utilizing GitHub Actions.
-Configuring CI use in a GitHub repository
+Configuring CI use of a GitHub repository
=========================================
The GitHub Actions based CI workflow may or may not be active by default,
@@ -33,6 +33,15 @@ and click on the '...' on the top right and choose 'Disable workflow'.
To enable the workflow, go to the same page and click on "Enable workflow" at
the top.
+However, to avoid issues with the thousands of forks of the postgres/postgres
+repository starting to run CI the next time the forks re-synchronize with the
+postgres/postgres, each repository needs to explicitly opt-in to actually run
+the full CI tests.
+
+To opt into CI, go to
+https://github.com/<username>/<reponame>//settings/variables/actions and
+create a new variable named PG_CI_ENABLED, with the value 1.
+
Viewing CI results in a GitHub repository
==========================================
--
2.54.0.380.gc69baaf57b
--eikbkdqspf4smrmy--
^ permalink raw reply [nested|flat] 111+ messages in thread
end of thread, other threads:[~2026-06-04 01:03 UTC | newest]
Thread overview: 111+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20 01:05 [PATCH v37 01/11] Add a syntax to create Incrementally Maintainable Materialized Views Yugo Nagata <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
2026-06-04 01:03 [PATCH v10a 3/3] ci: Make CI workflow as opt-in as possible Andres Freund <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox