Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/workflows/_detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,20 @@
DB_PATTERNS: ${{ inputs.db-paths }}
APP_PATTERNS: ${{ inputs.app-paths }}
CONFIG_PATTERNS: ${{ inputs.config-paths }}
run: |

Check failure on line 70 in .github/workflows/_detect-changes.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck] Raw Output: e:.github/workflows/_detect-changes.yml:70:9: shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check failure on line 70 in .github/workflows/_detect-changes.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck] Raw Output: e:.github/workflows/_detect-changes.yml:70:9: shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check failure on line 70 in .github/workflows/_detect-changes.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck] Raw Output: e:.github/workflows/_detect-changes.yml:70:9: shellcheck reported issue in this script: SC2129:style:8:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]
set -euo pipefail

# workflow_dispatch has no before SHA. Callers deliberately pass an
# empty base for that event, which means "run every category" rather
# than attempting an invalid/empty git diff.
if [ -z "$BASE_SHA" ]; then
echo "No base SHA supplied; treating manual dispatch as all paths changed."
echo "db_changed=true" >> "$GITHUB_OUTPUT"
echo "app_changed=true" >> "$GITHUB_OUTPUT"
echo "config_changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi

# Diff includes added/modified/deleted files.
mapfile -t CHANGED_FILES < <(git diff --name-only "$BASE_SHA" "$HEAD_SHA")

Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/_pg-migration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,32 @@
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
# Let Actions allocate an available host port. Self-hosted runners
# commonly already have (or reserve) 5432, so a fixed mapping is
# not a reliable way for the job process to reach this service.
- 5432/tcp
options: >-
--health-cmd pg_isready
--health-cmd "pg_isready -U postgres -d test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
ATLAS_VERSION: v1.3.0
DATABASE_URL: postgres://postgres:test@localhost:5432/test?sslmode=disable
steps:
- uses: actions/checkout@v6

# The job.services context is only available inside steps, not in the
# job-level env block. On the self-hosted fleet, this job executes in a
# runner container while service ports are published on the Docker host;
# the bridge gateway reaches that host (127.0.0.1 would be the runner).
- name: Configure ephemeral Postgres URL
env:
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}

Check failure on line 61 in .github/workflows/_pg-migration-test.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 property access of object must be type of string but got "number" [expression] Raw Output: e:.github/workflows/_pg-migration-test.yml:61:58: property access of object must be type of string but got "number" [expression]

Check failure on line 61 in .github/workflows/_pg-migration-test.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 property access of object must be type of string but got "number" [expression] Raw Output: e:.github/workflows/_pg-migration-test.yml:61:58: property access of object must be type of string but got "number" [expression]

Check failure on line 61 in .github/workflows/_pg-migration-test.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 property access of object must be type of string but got "number" [expression] Raw Output: e:.github/workflows/_pg-migration-test.yml:61:58: property access of object must be type of string but got "number" [expression]
run: |
set -euo pipefail
DOCKER_HOST_GATEWAY=$(docker network inspect bridge --format '{{(index .IPAM.Config 0).Gateway}}')
echo "DATABASE_URL=postgres://postgres:test@${DOCKER_HOST_GATEWAY}:${POSTGRES_PORT}/test?sslmode=disable" >> "$GITHUB_ENV"

- name: Install Atlas CLI
run: |
curl -sSf https://atlasgo.sh | sh -s -- --community --yes --version "$ATLAS_VERSION"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/obsidian-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
RELEASE_TOKEN:
required: false

# No consumer of this shared template previously had any concurrency dedup,
# so rapid pushes to the same branch queued/ran independently with no
# cancellation. Scoped per calling repo (multiple repos share this template)
# and per event type so push and PR runs don't collide.
concurrency:
group: >-
${{ github.repository }}-${{ github.event_name }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
filter:
name: Check for Code Changes
Expand Down Expand Up @@ -93,7 +102,7 @@
- run: npm ci
- run: npm run build
- name: Create plugin package
run: |

Check failure on line 105 in .github/workflows/obsidian-plugin-ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck] Raw Output: e:.github/workflows/obsidian-plugin-ci.yml:105:9: shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck]

Check warning on line 105 in .github/workflows/obsidian-plugin-ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:7:35: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/obsidian-plugin-ci.yml:105:9: shellcheck reported issue in this script: SC2086:info:7:35: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 105 in .github/workflows/obsidian-plugin-ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:6:30: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/obsidian-plugin-ci.yml:105:9: shellcheck reported issue in this script: SC2086:info:6:30: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 105 in .github/workflows/obsidian-plugin-ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck] Raw Output: e:.github/workflows/obsidian-plugin-ci.yml:105:9: shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck]

Check failure on line 105 in .github/workflows/obsidian-plugin-ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck] Raw Output: e:.github/workflows/obsidian-plugin-ci.yml:105:9: shellcheck reported issue in this script: SC2001:style:3:20: See if you can use ${variable//search/replace} instead [shellcheck]
VERSION=$(node -p "require('./manifest.json').version")
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
BRANCH_NAME_SAFE=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g')
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/self-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Self CI

# ---------------------------------------------------------------------------
# Validates this repo's own reusable workflows (.github/workflows/*.yml)
# before they reach consumers: catches YAML/syntax/expression errors via
# actionlint. Not a full test harness — just a fast lint pass.
# ---------------------------------------------------------------------------

on:
push:
paths:
- '.github/workflows/**'
pull_request:
paths:
- '.github/workflows/**'

concurrency:
group: >-
self-ci-${{ github.repository }}-${{ github.event_name }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
actionlint:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: reviewdog/action-actionlint@v1
with:
fail_level: error
Loading