ci: move update-maintainers commit/pr to env
Define the commit & PR title and body in env variables to make the script itself more readable and avoid any string escape issues.
This commit is contained in:
parent
7241b18a7b
commit
be8f7e100f
1 changed files with 42 additions and 42 deletions
84
.github/workflows/update-maintainers.yml
vendored
84
.github/workflows/update-maintainers.yml
vendored
|
|
@ -82,62 +82,62 @@ jobs:
|
|||
if: steps.check-changes.outputs.has_changes == 'true' || github.event.inputs.create_pr == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: |
|
||||
# Create a new branch for the update
|
||||
branch_name="maintainers/update-$(date +%Y%m%d%H%M%S)"
|
||||
git checkout -b "$branch_name"
|
||||
title: "maintainers: update all-maintainers.nix"
|
||||
commit_body: |
|
||||
Automated update of the master maintainers list combining:
|
||||
- Home Manager specific maintainers from modules/lib/maintainers.nix
|
||||
- Nixpkgs maintainers referenced in Home Manager modules
|
||||
|
||||
# Commit the changes
|
||||
git add all-maintainers.nix
|
||||
git commit -m "maintainers: update all-maintainers.nix
|
||||
Changes: ${{ steps.check-changes.outputs.changes_summary || 'No content changes' }}
|
||||
|
||||
Automated update of the master maintainers list combining:
|
||||
- Home Manager specific maintainers from modules/lib/maintainers.nix
|
||||
- Nixpkgs maintainers referenced in Home Manager modules
|
||||
Generated by: lib/python/generate-all-maintainers.py
|
||||
pr_body: |
|
||||
## 📋 Summary
|
||||
|
||||
Changes: ${{ steps.check-changes.outputs.changes_summary || 'No content changes' }}
|
||||
This PR updates the master maintainers list (`all-maintainers.nix`) which combines:
|
||||
- **Home Manager specific maintainers** from `modules/lib/maintainers.nix`
|
||||
- **Nixpkgs maintainers** referenced in Home Manager modules
|
||||
|
||||
Generated by: lib/python/generate-all-maintainers.py"
|
||||
## 🔄 Changes
|
||||
|
||||
# Push the branch
|
||||
git push origin "$branch_name"
|
||||
**Statistics:** ${{ steps.check-changes.outputs.changes_summary || 'No content changes (format/comment updates only)' }}
|
||||
|
||||
# Create the pull request
|
||||
gh pr create \
|
||||
--title "maintainers: update all-maintainers.nix" \
|
||||
--body "$(cat <<'EOF'
|
||||
## 📋 Summary
|
||||
The updated list includes all maintainers needed for review assignments across the Home Manager project.
|
||||
|
||||
This PR updates the master maintainers list (`all-maintainers.nix`) which combines:
|
||||
- **Home Manager specific maintainers** from `modules/lib/maintainers.nix`
|
||||
- **Nixpkgs maintainers** referenced in Home Manager modules
|
||||
## 🤖 Automation
|
||||
|
||||
## 🔄 Changes
|
||||
- **Generated by:** `lib/python/generate-all-maintainers.sh`
|
||||
- **Trigger:** ${{ github.event_name == 'schedule' && 'Scheduled weekly update' || 'Manual workflow dispatch' }}
|
||||
- **Validation:** File syntax verified with `nix eval`
|
||||
|
||||
**Statistics:** ${{ steps.check-changes.outputs.changes_summary || 'No content changes (format/comment updates only)' }}
|
||||
## 📚 Usage
|
||||
|
||||
The updated list includes all maintainers needed for review assignments across the Home Manager project.
|
||||
This file can be imported and used for maintainer lookups:
|
||||
```nix
|
||||
let allMaintainers = import ./all-maintainers.nix; in
|
||||
# Access any maintainer by name: allMaintainers.username
|
||||
```
|
||||
|
||||
## 🤖 Automation
|
||||
---
|
||||
🤖 *This PR was automatically created by the [update-maintainers workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})*
|
||||
run: |
|
||||
# Create a new branch for the update
|
||||
branch_name="maintainers/update-$(date +%Y%m%d%H%M%S)"
|
||||
git checkout -b "$branch_name"
|
||||
|
||||
- **Generated by:** `lib/python/generate-all-maintainers.sh`
|
||||
- **Trigger:** ${{ github.event_name == 'schedule' && 'Scheduled weekly update' || 'Manual workflow dispatch' }}
|
||||
- **Validation:** File syntax verified with `nix eval`
|
||||
# Commit the changes
|
||||
git add all-maintainers.nix
|
||||
git commit -m "$title" -m "$commit_body"
|
||||
|
||||
## 📚 Usage
|
||||
# Push the branch
|
||||
git push origin "$branch_name"
|
||||
|
||||
This file can be imported and used for maintainer lookups:
|
||||
```nix
|
||||
let allMaintainers = import ./all-maintainers.nix; in
|
||||
# Access any maintainer by name: allMaintainers.username
|
||||
```
|
||||
|
||||
---
|
||||
🤖 *This PR was automatically created by the [update-maintainers workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})*
|
||||
EOF
|
||||
)" \
|
||||
--label "dependencies" \
|
||||
--label "maintainers"
|
||||
# Create the pull request
|
||||
gh pr create \
|
||||
--title "$title" \
|
||||
--body "$pr_body" \
|
||||
--label "dependencies" \
|
||||
--label "maintainers"
|
||||
- name: Summary
|
||||
run: |
|
||||
if [[ "${{ steps.check-changes.outputs.has_changes }}" == "true" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue