Skip to content
Merged
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
20 changes: 16 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -660,14 +660,15 @@ jobs:

# ── Update Nix package versions ────────────────────────────────────
# Updates packaging/nix/versions.json with the new release hashes and
# commits back to master so `nix run github:vmvarela/sql-pipe` always
# opens a Pull Request so `nix run github:vmvarela/sql-pipe` always
# points to the latest version.
update-nix:
name: Update Nix package
needs: checksums
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -718,10 +719,21 @@ jobs:
echo "==> Updated Nix versions.json for sql-pipe ${VERSION}:"
cat packaging/nix/versions.json

- name: Commit and push
- name: Open Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="chore/nix-update-${{ github.ref_name }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b "${BRANCH}"
git add packaging/nix/versions.json
git diff --cached --quiet || git commit -m "chore(nix): update to ${{ github.ref_name }}"
git push
git diff --cached --quiet && echo "No changes to commit." && exit 0
git commit -m "chore(nix): update versions.json to ${{ github.ref_name }}"
git push origin "${BRANCH}"
gh pr create \
--base master \
--head "${BRANCH}" \
--title "chore(nix): update versions.json to ${{ github.ref_name }}" \
--body "Automated update of \`packaging/nix/versions.json\` hashes for release \`${{ github.ref_name }}\`." \
--label "type:chore"
Loading