https://github.com/sawadashota/orb-update
Update CircleCI Orbs versions
https://github.com/sawadashota/orb-update
circleci cli go orb orb-versions
Last synced: about 1 year ago
JSON representation
Update CircleCI Orbs versions
- Host: GitHub
- URL: https://github.com/sawadashota/orb-update
- Owner: sawadashota
- License: mit
- Created: 2019-12-05T06:52:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-17T05:12:43.000Z (over 5 years ago)
- Last Synced: 2025-02-27T07:06:11.533Z (over 1 year ago)
- Topics: circleci, cli, go, orb, orb-versions
- Language: Go
- Homepage: https://circleci.com/orbs/registry/orb/sawadashota/orb-update
- Size: 200 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
orb-update
===
[](https://godoc.org/github.com/sawadashota/orb-update)
[](https://circleci.com/gh/sawadashota/orb-update/tree/master)
[](https://codeclimate.com/github/sawadashota/orb-update/maintainability)
[](https://codeclimate.com/github/sawadashota/orb-update/test_coverage)
[](https://goreportcard.com/report/github.com/sawadashota/orb-update)
[](https://golangci.com/r/github.com/sawadashota/orb-update)
[](https://opensource.org/licenses/MIT)
Update CircleCI Orbs versions
Usage
---
Create CircleCI config yaml
```yaml
orbs:
slack: circleci/slack@1.0.0
hello-build: circleci/hello-build@0.0.13
```
Execute command
```
$ orb-update
```
Then orb's versions are updated
```yaml
orbs:
slack: circleci/slack@3.4.1
hello-build: circleci/hello-build@0.0.14
```
### Pull Request Creation Option
orb-update can update orb and create pull request.
Here is minimum sample.
```yaml
version: 2.1
orbs:
orb-update: sawadashota/orb-update@volatile
workflows:
orb-update:
jobs:
- orb-update/orb-update
```
And following environment variables are required.
* `GITHUB_USERNAME`: GitHub token's user
* `GITHUB_TOKEN`: [GitHub access token](https://github.com/settings/tokens/new?scopes=repo,user:email&description=CircleCI%20for%20orb-update)
Installation
---
```
$ go get -u github.com/sawadashota/orb-update
```
or
```
$ brew tap sawadashota/homebrew-cheers
$ brew install orb-update
```
Using CircleCI Orb
---
It's easy to check and update orb version every night. Here is an example.
```yaml
version: 2.1
orbs:
orb-update: sawadashota/orb-update@volatile
workflows:
orb-update:
jobs:
- orb-update/orb-update:
repository: owner/repository-name
triggers:
- schedule:
cron: "0 19 * * *"
filters:
branches:
only:
- master
```
https://circleci.com/orbs/registry/orb/sawadashota/orb-update
Configuration
---
Define configuration `.orb-update.yml` or CLI argument `--config`.
```yaml
# target config file path
# default is `.circleci/config.yml`
target_files:
- .circleci/config.yml
repository:
# name of this repository
name: sawadashota/orb-update
git:
# author of commit
# require when Pull Request Creation
# if empty, fetch from GitHub
author:
name: sawadashota
email: example@example.com
github:
# Pull Request creation option
# default is false
pull_request: true
# these should be configured by environment variable because of credentials
#
# `GITHUB_USERNAME`
#username: sawadashota
# `GITHUB_TOKEN`
#token: github_token
# base branch
# default is `master`
base_branch: master
filesystem:
# filesystem strategy supports `os` and `memory`
# default is `os` for easy to use in local
# but in CI, `memory` is recommended
strategy: memory
ignore:
- circleci/orb-tools
```
Using Docker Image
---
```
$ docker run --rm -v $(pwd):/repo sawadashota/orb-update orb-update
```
https://hub.docker.com/r/sawadashota/orb-update