Skip to content

Add checkout-as-app action and enhance github-app-auth#9

Merged
nsheaps merged 1 commit intomainfrom
claude/github-actions-app-auth-qUrm8
Mar 8, 2026
Merged

Add checkout-as-app action and enhance github-app-auth#9
nsheaps merged 1 commit intomainfrom
claude/github-actions-app-auth-qUrm8

Conversation

@nsheaps
Copy link
Owner

@nsheaps nsheaps commented Mar 8, 2026

Summary

This PR introduces a new GitHub Action (checkout-as-app) that combines GitHub App authentication with repository checkout, and enhances the existing github-app-auth action with additional functionality.

Key Changes

New Action: checkout-as-app

  • Created a new composite action that authenticates as a GitHub App and checks out a repository with the app token baked into the remote URL
  • Enables subsequent git operations to automatically use the app credentials
  • Passes through all standard actions/checkout inputs (repository, ref, path, clean, filter, sparse-checkout, fetch-depth, fetch-tags, lfs, submodules, etc.)
  • Outputs both authentication info (token, app-slug, user-id, user-name, user-email) and checkout info (ref, commit)

Enhanced github-app-auth Action

  • Added skip-checkout input to allow the action to be used without performing its own checkout (useful when called from checkout-as-app)
  • Added user-email output that constructs the GitHub App bot email in the standard format: {user-id}+{user-name}@users.noreply.github.com
  • Refactored user info retrieval to compute email address alongside user ID and name
  • Added informational logging to output GitHub App authentication details
  • Made the built-in checkout step conditional based on the skip-checkout input
  • Updated git config commands to use the new user-email output instead of inline computation

Implementation Details

  • The checkout-as-app action is a two-step composite action: first it authenticates via github-app-auth with skip-checkout: true, then it performs checkout using actions/checkout with the obtained token
  • Email address generation follows GitHub's standard format for bot accounts
  • All inputs are properly documented with descriptions and defaults
  • The action maintains backward compatibility with existing github-app-auth usage

https://claude.ai/code/session_013AzQ3VqAJ2sGSyUFDRBS2X

Add a new `checkout-as-app` composite action that combines GitHub App
authentication with repository checkout in a single step. This replaces
the previous pattern of checkout -> auth -> re-checkout by doing
auth first (via github-app-auth) then a single checkout with the app
token baked into the remote URL, so subsequent git operations work
seamlessly.

Changes to github-app-auth:
- Add `skip-checkout` input (default: false) for backward compatibility
  while allowing checkout-as-app to handle checkout separately
- Add `user-email` output
- Add debug output step for authentication info
- Use shell variables for cleaner output computation

https://claude.ai/code/session_013AzQ3VqAJ2sGSyUFDRBS2X
@nsheaps nsheaps merged commit 8621287 into main Mar 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants