A GitHub action to register Julia packages in custom (e.g. private) registries.
registry(required): GitHub repository of the private registry (in the formowner/repository).subdirectory(optional): Subdirectory of the repository where the package lives. Defaults to..push(optional): Iftrue, push the branch to the registry. Defaults totrue.- Defaults to
true.
- Defaults to
branch(optional): Ifinputs.push=true, branch name where the registering package will be uploaded.- Defaults to the string returned by
RegistryTools.registration_branch.
- Defaults to the string returned by
name(optional): Name of the committing user.- Defaults to
${{ github.actor }}.
- Defaults to
email(optional): Email of the committing user.- Defaults to
${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com.
- Defaults to
name: Project name.uuid: Project UUID.version: Project version.hash: Tree hash of the registering package.branch: Ifinputs.push=true, branch where the registering package has been uploaded.path: Path to the locally cloned Git repository of the private registry.
name: Register Package
on:
workflow_dispatch:
jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v3
- uses: julia-actions/cache@v3
- uses: julia-actions/register-pkg-in-registry@v0.4
with:
registry: YOUR_ORGANIZATION/YOUR_REGISTRY_REPO
env:
GITHUB_TOKEN: ${{ secrets.MY_PAT }}GITHUB_TOKEN must be set to a token configured with Contents and Pull Requests write permissions on the registry repository, otherwise the workflow won't be able to push the branch to the registry repository.
If all your repositories (custom registry and the Julia packages) live within the same organisation, you can set up a GitHub App to automatically generate an ephemeral token with the actions/create-github-app-token workflow:
name: Register Package
on:
workflow_dispatch:
jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v3
- uses: julia-actions/cache@v3
- uses: actions/create-github-app-token@v3
id: generate_token
with:
client-id: "${{ secrets.APP_ID }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
permission-contents: "write"
permission-pull-requests: "write"
owner: YOUR_ORGANIZATION
repositories: |
YOUR_REGISTRY_REPO
- uses: julia-actions/register-pkg-in-registry@v0.4
with:
registry: YOUR_ORGANIZATION/YOUR_REGISTRY_REPO
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}