Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8970e0e
feat: extensible format and provider system with YAML and local ref s…
ineedjet Jun 21, 2026
d3ef623
fix: resolve ruff lint errors (F401, I001, UP037)
ineedjet Jun 21, 2026
4ea22fd
fix: address review feedback — cache asset bug, local refresh, YAML b…
ineedjet Jun 21, 2026
c747302
fix: address second round of review feedback
ineedjet Jun 21, 2026
1aa025d
fix: indent replacement body to match YAML marker indentation
ineedjet Jun 21, 2026
0ef3f0c
refactor: remove TextFormat fallback, process only known formats
ineedjet Jun 21, 2026
4c795cc
refactor: consolidate modules, eliminate circular imports
ineedjet Jun 21, 2026
6c9628f
fix: address second round of review feedback
ineedjet Jun 21, 2026
9f38b55
chore: add dependabot config with local embedder fragment
ineedjet Jun 21, 2026
520f0fc
chore: move entire dependabot config into a single local fragment
ineedjet Jun 21, 2026
a68409b
chore: refresh local fragments during release preparation
ineedjet Jun 21, 2026
18d4074
feat: add --local-only flag to embedder update
ineedjet Jun 21, 2026
c935e62
feat: extract refresh-local-fragments composite action
ineedjet Jun 21, 2026
52d1c46
fix: move dependabot fragment to .github/fragments/
ineedjet Jun 21, 2026
9b1ad0f
chore: drop setup-python from refresh-local-fragments action
ineedjet Jun 21, 2026
e766b25
Delete dependabot.yaml
ineedjet Jun 21, 2026
259e164
refactor: resolve local: refs relative to base_dir (default CWD)
ineedjet Jun 21, 2026
1c4296f
refactor: extract PR creation into open-fragments-pr composite action
ineedjet Jun 21, 2026
f16f811
refactor: align update-fragments.yml with shared workflow pattern
ineedjet Jun 21, 2026
b4a25e9
chore: extract pytest into separate spec workflow
ineedjet Jun 21, 2026
48922d9
refactor: simplify PR body to git diff --stat, drop JSON output
ineedjet Jun 21, 2026
15fa6fa
feat: auto-bump embedder version in shared workflow on release
ineedjet Jun 21, 2026
38ae54f
refactor: extract install-embedder action, version pin lives in uses:…
ineedjet Jun 21, 2026
ce1deff
chore: install lint tools explicitly for baseline v0.6.2 compatibility
ineedjet Jun 21, 2026
6c3c224
chore: use setup-runtimes from baseline instead of manual installs
ineedjet Jun 21, 2026
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
22 changes: 22 additions & 0 deletions .github/actions/bump-shared-workflow-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bump shared workflow embedder version
description: Bump the embedder pip install version in update-fragments-shared.yml, commit and push.
inputs:
version:
description: Release version without v prefix.
required: true
runs:
using: composite
steps:
- name: Bump and commit
shell: bash
run: |
set -euo pipefail
file=.github/workflows/update-fragments-shared.yml
if ! grep -q 'install-embedder@v' "$file" 2>/dev/null; then
exit 0
fi
sed -i "s|/install-embedder@v[^'\"]*|/install-embedder@v${{ inputs.version }}|" "$file"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "$file"
git diff --cached --quiet || git commit -m "chore: bump shared workflow to ${{ inputs.version }}"
8 changes: 8 additions & 0 deletions .github/actions/install-embedder/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Install embedder
description: Install embedder from this repository's source tree.
runs:
using: composite
steps:
- name: Install
shell: bash
run: pip install -e "${{ github.action_path }}/../../.."
30 changes: 30 additions & 0 deletions .github/actions/open-fragments-pr/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Open fragments PR
description: "Commit fragment updates and open a pull request."
inputs:
branch:
description: Branch name for the PR.
required: false
default: embedder/update-fragments
runs:
using: composite
steps:
- name: Commit and open pull request
shell: bash
env:
GH_TOKEN: ${{ github.token }}
BRANCH: ${{ inputs.branch }}
run: |
stat=$(git diff --stat)
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$BRANCH"
git add -A
git commit -m "chore: update embedded fragments"
git push origin "$BRANCH" --force
existing=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number // empty')
if [ -z "$existing" ]; then
gh pr create \
--title "chore: update embedded fragments" \
--body "$stat" \
--head "$BRANCH"
fi
18 changes: 18 additions & 0 deletions .github/actions/refresh-local-fragments/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Refresh local fragments
description: "Re-embed all local: fragment refs in the workspace without bumping external dependencies."
inputs:
paths:
description: Files or directories to scan. Defaults to the current directory.
required: false
default: "."
runs:
using: composite
steps:
- name: Refresh local fragments
shell: bash
env:
EMBEDDER_PATHS: ${{ inputs.paths }}
run: |
pip install -e "${{ github.action_path }}/../../.."
read -ra paths <<< "$EMBEDDER_PATHS"
embedder update "${paths[@]}" --local-only
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# embedder local:fragments/dependabot.yaml
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
# /embedder
12 changes: 4 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: rubykatzen/baseline/.github/actions/lint-yamllint@v0.5.2
- uses: rubykatzen/baseline/.github/actions/lint-ruff@v0.5.2
- uses: rubykatzen/baseline/.github/actions/lint-actionlint@v0.5.2
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: pip install -e . pytest
- run: pytest
- uses: rubykatzen/baseline/.github/actions/setup-runtimes@v0.6.2
- uses: rubykatzen/baseline/.github/actions/lint-yamllint@v0.6.2
- uses: rubykatzen/baseline/.github/actions/lint-ruff@v0.6.2
- uses: rubykatzen/baseline/.github/actions/lint-actionlint@v0.6.2
4 changes: 4 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
- uses: rubykatzen/releaser/.github/actions/bump-pyproject-version@v0.3.4
with:
version: ${{ inputs.version }}
- uses: ./.github/actions/bump-shared-workflow-version
with:
version: ${{ inputs.version }}
- uses: ./.github/actions/refresh-local-fragments
- uses: rubykatzen/releaser/.github/actions/push-release-branch@v0.3.4
with:
version: ${{ inputs.version }}
16 changes: 16 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Spec
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: pip install -e . pytest
- run: pytest
32 changes: 3 additions & 29 deletions .github/workflows/update-fragments-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install embedder
run: pip install "git+https://github.com/rubykatzen/embedder.git@v0.0.5"
- uses: rubykatzen/embedder/.github/actions/install-embedder@v0.0.6
- name: Run embedder update
env:
GH_TOKEN: ${{ secrets.token || github.token }}
EMBEDDER_PATHS: ${{ inputs.paths }}
run: |
read -ra paths <<< "$EMBEDDER_PATHS"
embedder update "${paths[@]}" --json > /tmp/embedder-result.json
embedder update "${paths[@]}"
- name: Detect changes
id: diff
run: |
Expand All @@ -41,26 +37,4 @@ jobs:
fi
- name: Open pull request
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
branch="embedder/update-fragments"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$branch"
git add -A
git commit -m "chore: update embedded fragments"
git push origin "$branch" --force
body=$(jq -r '
"## Embedded fragment updates\n\n| File | Source | Asset | Old | New |\n|---|---|---|---:|---:|\n" +
([.changed[] | .changed_blocks[] |
"| \(.block.path) | \(.block.ref.owner)/\(.block.ref.repo) | \(.block.ref.asset) | \(.block.ref.tag) | \(.latest_tag) |"
] | join("\n"))
' /tmp/embedder-result.json)
existing=$(gh pr list --head "$branch" --json number --jq '.[0].number // empty')
if [ -z "$existing" ]; then
gh pr create \
--title "chore: update embedded fragments" \
--body "$body" \
--head "$branch"
fi
uses: ./.github/actions/open-fragments-pr

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep PR action available to reusable-workflow callers

In the shared workflow documented for consuming repos, this step runs after actions/checkout, which checks out the caller's repository. A local uses: ./.github/actions/open-fragments-pr is therefore resolved in the caller workspace; any consumer that does not also vendor this new action will fail before opening the update PR. Keep this inline or reference the action via rubykatzen/embedder/.github/actions/open-fragments-pr@....

Useful? React with 👍 / 👎.

30 changes: 30 additions & 0 deletions .github/workflows/update-fragments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update embedded fragments
on:
schedule:
- cron: '0 8 * * *' # 10:00 Berlin (CEST, UTC+2)
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- name: Run embedder update
env:
GH_TOKEN: ${{ github.token }}
run: |
pip install -e .
embedder update .
- name: Detect changes
id: diff
run: |
if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Open pull request
if: steps.diff.outputs.changed == 'true'
uses: ./.github/actions/open-fragments-pr
10 changes: 10 additions & 0 deletions fragments/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
Loading