GitHub Action for logging in to the Buddy Docker registry using the BDY CLI.
- Authenticate with Buddy's Docker registry
- Works with
buddy/loginenvironment variables or direct inputs - Supports on-premises Buddy installations via custom API endpoint
steps:
- uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: US
- uses: buddy/docker-login@v1steps:
- uses: buddy/docker-login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: ussteps:
- uses: buddy/docker-login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
api_url: https://buddy.example.com/apiBy default, this action automatically installs the latest BDY CLI from the production channel. If you need a specific version or channel, use buddy/setup before this action.
| Input | Description | Required | Default |
|---|---|---|---|
token |
Buddy personal access token | No | BUDDY_TOKEN env var |
region |
Buddy region (us, eu, as) |
No | BUDDY_REGION env var |
api_url |
Buddy API endpoint for on-premises installations | No | BUDDY_API_ENDPOINT env var |
debug |
Run the BDY CLI in DEBUG mode and dump ~/.bdy/cli.log on failure |
No | false |
When using buddy/login, the following environment variables are automatically set and used as defaults:
BUDDY_TOKEN- Buddy personal access tokenBUDDY_REGION- Buddy regionBUDDY_API_ENDPOINT- Buddy API endpoint (on-premises only)
name: Build and Push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: US
- uses: buddy/docker-login@v1
- run: docker build -t container.registry.sh/my-workspace/my-app:latest .
- run: docker push container.registry.sh/my-workspace/my-app:latestIf a BDY CLI command fails, the action throws an error that includes the exit code, the command that was run, and its captured output.
Enabling debug runs the BDY CLI in DEBUG mode, so it writes verbose logs to ~/.bdy/cli.log, and on failure dumps that log (plus a stack trace) into the workflow output. Enable it in either of these ways:
-
Per step — set the
debuginput on this action:- uses: buddy/docker-login@v1 with: debug: true
-
Whole run — enable GitHub step debug logging, either by ticking Enable debug logging in the "Re-run jobs" dialog or by setting the
ACTIONS_STEP_DEBUGrepository secret/variable totrue.