bcgov/OpenShift CLI (oc) Login and Runner
Action for running OpenShift (oc) commands and managing cronjobs. Supports conditional execution based on file changes and provides detailed logging.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 2, 2026
- License
- Apache 2.0
Pinned Snippet
uses: bcgov/action-oc-runner@111868d1fc50db0a40417ba321d865ef5c931bbd # v1.7.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| oc_namespace | OpenShift namespace Example: abc123-dev, abc123-test, abc123-prod | yes | — |
| oc_server | OpenShift server URL with port Example: https://api.silver.devops.gov.bc.ca:6443 | yes | — |
| oc_token | OpenShift access token for authentication Should be stored as a GitHub secret | yes | — |
| commands | Commands to run (generally oc commands) Example: oc whoami | — | — |
| cronjob | Name of the cronjob to execute and monitor Example: nr-repository-name-cronjob-component | — | — |
| triggers | Bash array to diff for triggering, omit to always run Example: ('./common', './backend/' './frontend/) | — | — |
| cronjob_tail | Number of cronjob log lines to tail; use -1 for all Example: 100, 200, -1 | — | -1 |
| diff_branch | Branch to diff against Example: main, master, SHA or tag | — | ${{ github.event.repository.default_branch }} |
| oc_version | Override oc version, >= 4.0 Example: 4.18 | — | 4.18 |
| repository | Optionally, specify a different repo to clone Example: bcgov/openshift-quickstart | — | "" |
| ref | The branch, tag or SHA to checkout; omit to use the current branch Example: main, master, SHA or tag | — | "" |
| timeout | Timeout for commands or cronjob Example: 10m, 30s, 1h | — | 10m |
| github_token | Specify token (GH or PAT), instead of inheriting one from the calling workflow | — | ${{ github.token }} |
| verbose | Enable bash xtrace (`set -x`) for commands input debugging Example: true, false | — | false |
| login_attempts | Maximum number of connection retry attempts for logging into OpenShift Example: 5, 10 | — | 5 |
Outputs
| name | description |
|---|---|
| commands | Generic output channel for data produced by the commands step. Typically populated via $GITHUB_OUTPUT in the commands step and may be empty if no commands are run or the commands step does not execute. |
| job-name | Name of the job created from the cronjob param |
| triggered | Whether the action was triggered |