Skip to content

chore(ci): add automatic production deployer, re-scope github app - #116

Merged
dotkas merged 2 commits into
developfrom
dotkas/automatic-prod-deploys
Aug 14, 2026
Merged

chore(ci): add automatic production deployer, re-scope github app#116
dotkas merged 2 commits into
developfrom
dotkas/automatic-prod-deploys

Conversation

@dotkas

@dotkas dotkas commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 14, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the scope of the GitHub App token used in CI workflows and introduces a scheduled workflow that automatically opens (and auto-merges) a “develop → main” production PR when there are changes to ship.

Changes:

  • Restrict actions/create-github-app-token to the current repository via repositories: ${{ github.event.repository.name }} across multiple workflows.
  • Add a new scheduled/manual workflow to create a production PR from develop to main and enable auto-merge.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/update-deps-github-actions.yml Scope the GitHub App token to the current repository.
.github/workflows/update-deps-cargo.yml Scope the GitHub App token to the current repository.
.github/workflows/deploy.yml Scope the GitHub App token to the current repository in the deploy workflow.
.github/workflows/check-openapi-versions.yml Scope the GitHub App token to the current repository.
.github/workflows/automatic-prod-pr.yml Add scheduled workflow to open/auto-merge a “develop → main” production PR.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/automatic-prod-pr.yml Outdated
Comment thread .github/workflows/automatic-prod-pr.yml Outdated
Copilot AI review requested due to automatic review settings August 14, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (6)

.github/workflows/automatic-prod-pr.yml:74

  • To keep merge behavior consistent with the other auto-merge workflow (which explicitly sets merge-method: squash), set the merge method here as well so the resulting history doesn’t depend on the action’s default.
        with:
          token: ${{ steps.app.outputs.token }}
          pull-request-number: ${{ steps.create_pr.outputs.pr_number }}

.github/workflows/update-deps-github-actions.yml:17

  • github.event.repository.name is not set for schedule runs, so this can evaluate to an empty value and cause the app token to be unscoped or the step to fail. Derive the repository name from github.repository instead so it works for all event types.
          owner: ${{ github.repository_owner }}
          client-id: ${{ vars.HOUSEKEEPING_BOT_APP_ID }}
          repositories: ${{ github.event.repository.name }}
          private-key: ${{ secrets.HOUSEKEEPING_BOT_PRIVATE_KEY }}

.github/workflows/update-deps-cargo.yml:20

  • github.event.repository.name is not set for schedule runs, so this can evaluate to an empty value and cause the app token to be unscoped or the step to fail. Derive the repository name from github.repository instead so it works for all event types.
          owner: ${{ github.repository_owner }}
          client-id: ${{ vars.HOUSEKEEPING_BOT_APP_ID }}
          repositories: ${{ github.event.repository.name }}
          private-key: ${{ secrets.HOUSEKEEPING_BOT_PRIVATE_KEY }}

.github/workflows/check-openapi-versions.yml:32

  • github.event.repository.name is not set for schedule runs, so this can evaluate to an empty value and cause the app token to be unscoped or the step to fail. Derive the repository name from github.repository instead so it works for all event types.
        with:
          owner: ${{ github.repository_owner }}
          client-id: ${{ vars.HOUSEKEEPING_BOT_APP_ID }}
          repositories: ${{ github.event.repository.name }}
          private-key: ${{ secrets.HOUSEKEEPING_BOT_PRIVATE_KEY }}

.github/workflows/deploy.yml:44

  • github.event.repository.name is not set for some event types (notably schedule), which can lead to an empty repository list and a broadly scoped or failing token. Using the repository name derived from github.repository is consistent and works across events.
          owner: ${{ github.repository_owner }}
          client-id: ${{ vars.HOUSEKEEPING_BOT_APP_ID }}
          repositories: ${{ github.event.repository.name }}
          private-key: ${{ secrets.HOUSEKEEPING_BOT_PRIVATE_KEY }}

.github/workflows/automatic-prod-pr.yml:22

  • This workflow is triggered by schedule, where github.event.repository.name is not populated. That can make the GitHub App token creation step fail or produce an unexpectedly broad token. Compute the repo name from github.repository instead.

This issue also appears on line 72 of the same file.

          owner: ${{ github.repository_owner }}
          client-id: ${{ vars.HOUSEKEEPING_BOT_APP_ID }}
          repositories: ${{ github.event.repository.name }}
          private-key: ${{ secrets.HOUSEKEEPING_BOT_PRIVATE_KEY }}

@dotkas
dotkas merged commit f98012e into develop Aug 14, 2026
8 checks passed
@dotkas
dotkas deleted the dotkas/automatic-prod-deploys branch August 14, 2026 16:27
@alchemax-housekeeper

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants