Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 41 additions & 19 deletions .github/workflows/bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ on:
extension_name:
description: "The PostgreSQL extension to build (directory name)"
required: true
type: choice
options:
- pgvector
- postgis
- pgaudit
- pg-crash
type: string

defaults:
run:
Expand All @@ -33,6 +28,43 @@ jobs:
with:
persist-credentials: false

- name: Fetch valid targets
id: get-targets
uses: dagger/dagger-for-github@27b130bf0f79a7f6fbbbe0fbca6760dc9bb40a77 # v8.4.1
env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.20.6
with:
version: ${{ env.DAGGER_VERSION }}
verb: call
module: ./dagger/maintenance/
args: get-targets

- name: Validate extension name
if: github.event_name == 'workflow_dispatch'
env:
INPUT_EXTENSION_NAME: ${{ github.event.inputs.extension_name }}
VALID_TARGETS: ${{ steps.get-targets.outputs.output }}
run: |
if ! echo "$VALID_TARGETS" | jq -e --arg ext "$INPUT_EXTENSION_NAME" 'index($ext)' > /dev/null; then
echo "::error::'$INPUT_EXTENSION_NAME' is not a valid extension target. Valid targets: $VALID_TARGETS"
exit 1
fi

- name: Compute paths-filter extensions block
env:
VALID_TARGETS: ${{ steps.get-targets.outputs.output }}
run: |
if ! echo "$VALID_TARGETS" | jq -e 'length > 0' > /dev/null; then
echo "::error::dagger get-targets returned no extensions: $VALID_TARGETS"
exit 1
fi
{
echo 'EXTENSIONS<<YAML_EOF'
echo "$VALID_TARGETS" | jq -r '.[] | "\(.):\n - \"\(.)/**\"\n - *shared"'
echo 'YAML_EOF'
} >> "$GITHUB_ENV"

- name: Check for changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
Expand All @@ -42,19 +74,9 @@ jobs:
- 'docker-bake.hcl'
- 'Taskfile.yml'
- 'test/**'
- '.github/workflows/bake*.yml'
pgvector:
- 'pgvector/**'
- *shared
postgis:
- 'postgis/**'
- *shared
pgaudit:
- 'pgaudit/**'
- *shared
pg-crash:
- 'pg-crash/**'
- *shared
- 'dagger/maintenance/**'
- '.github/workflows/bake_targets.yml'
${{ env.EXTENSIONS }}

# Compute a matrix containing the list of all extensions that have been modified
- name: Compute matrix
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING_NEW_EXTENSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ Before proposing a change, ensure your local machine is compatible with the

1. **Fork** the [cloudnative-pg/postgres-extensions-containers](https://github.com/cloudnative-pg/postgres-extensions-containers) repository.
2. **Clone** your fork and enter the directory:
```sh
git clone https://github.com/<your-username>/postgres-extensions-containers.git
cd postgres-extensions-containers
```
```sh
git clone https://github.com/<your-username>/postgres-extensions-containers.git
cd postgres-extensions-containers
```
3. **Verify the Environment:** Run the following to ensure you can build the
existing project ecosystem.
```sh
task prereqs # Check if Go, Task, and Docker are ready
task checks:all # Validate current configurations
task bake:all # Optional: build all existing extensions to confirm the Dagger engine
```
```sh
task prereqs # Check if Go, Task, and Docker are ready
task checks:all # Validate current configurations
task bake:all # Optional: build all existing extensions to confirm the Dagger engine
```

---

Expand Down
5 changes: 3 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@
"datasourceTemplate": "deb"
},
{
"description": "updates the Taskfile dependencies",
"description": "updates the Taskfile and GitHub Actions workflow dependencies",
"customType": "regex",
"managerFilePatterns": [
"Taskfile.yml"
"Taskfile.yml",
".github/workflows/*.yml"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: currentValue=(?<currentValue>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_SHA\\s*:\\s*[\"']?(?<currentDigest>[a-f0-9]+?)[\"']?\\s",
Expand Down
Loading