GitHub Repositories
Use these actions when a mold manages repository-level resources: the repository itself, topics, or pull requests.
All GitHub actions use the Forge GitHub App configured for your tenant. Users do not need to paste GitHub tokens into molds.
github.repo.create
Section titled “github.repo.create”Creates a GitHub repository. If the repository already exists, the action returns the existing repository instead of failing.
steps: - id: create-repo name: Create repository action: github.repo.create inputs: name: "${{ inputs.name }}" owner: "${{ inputs.owner }}" description: "${{ inputs.description }}" private: "${{ inputs.private }}" auto_init: true topics: - shoehorn - service custom_properties: managed-by: shoehorn service-type: apiCommon inputs:
| Input | Required | Description |
|---|---|---|
name | Yes | Repository name |
owner | Yes | Organization or owner, for example github.com/adaptive-labs or adaptive-labs |
description | No | Repository description |
homepage | No | Repository homepage URL |
private | No | Whether the repository is private |
visibility | No | GitHub visibility value, such as private or public |
auto_init | No | Create the first commit so file actions can write immediately |
gitignore_template | No | GitHub .gitignore template name, such as Go |
license_template | No | GitHub license key, such as mit |
topics | No | Repository topics to set |
custom_properties | No | GitHub organization custom properties |
custom_properties_required | No | Fail the run if custom properties cannot be applied |
Custom properties require GitHub organization support and the right app permissions. By default, Forge logs a warning and continues if GitHub rejects the custom properties request. Set custom_properties_required: true when those properties must be applied before the mold can be considered successful.
Outputs include the repository name, full name, clone URLs, default branch, and HTML URL.
github.repo.update
Section titled “github.repo.update”Updates settings on an existing repository.
steps: - id: update-repo name: Update repository settings action: github.repo.update inputs: owner: "${{ inputs.owner }}" repo: "${{ inputs.name }}" description: "${{ inputs.description }}" private: "${{ inputs.private }}" custom_properties: lifecycle: productionUse this when the repository already exists and the mold should align its settings.
github.topics.set
Section titled “github.topics.set”Replaces the repository topic list.
steps: - id: set-topics name: Set repository topics action: github.topics.set inputs: owner: "${{ inputs.owner }}" repo: "${{ inputs.name }}" topics: - shoehorn - golang - serviceUse this when topics are managed by the mold and should be fully controlled by Forge.
github.pr.create
Section titled “github.pr.create”Creates a pull request. If a pull request already exists for the same head and base branch, Forge returns the existing one.
steps: - id: open-pr name: Open pull request action: github.pr.create inputs: owner: "${{ inputs.owner }}" repo: "${{ inputs.name }}" title: "Add service scaffold" body: "Created by Shoehorn Forge." head: scaffold-service base: mainRequired inputs are owner, repo, title, and head. base defaults to main.