https://github.com/moonbarc/knob
Allows for easy deployment to Github Packages.
https://github.com/moonbarc/knob
Last synced: about 2 months ago
JSON representation
Allows for easy deployment to Github Packages.
- Host: GitHub
- URL: https://github.com/moonbarc/knob
- Owner: MoonBarc
- License: mit
- Created: 2020-08-08T14:47:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-13T13:16:18.000Z (almost 5 years ago)
- Last Synced: 2025-03-14T01:35:29.224Z (3 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Knob
A simple cli app that builds a docker image, tags it with a version, and pushes it to GitHub Packages for Docker.Made by MoonBarc so he doesn't lose his sanity when developing for Docker.
## Docs
In order to use Knob, you must have a `Knobfile` in your current directory. A Knobfile defines things like the version, url, and authorization details.
Here's an example:
```shell
# Knobfile v0.1
# This is an example Knobfile.# Fallback for when $ask receives no input or when using $default
SETDEFAULT 0.1# Use $ask to get a prompt from the terminal, or fall back to the latest default set above.
VERSION $ask# : Github username : A plain github token stored at that path.
LOGIN MoonBarc ~/GH_TOKEN.txt# $version is replaced with the version specified.
URL docker.pkg.github.com/hypersapling/master-node/mkube-master:$version
```There are 4 verbs so far:
`[SETDEFAULT,VERSION,LOGIN,URL]`### [!] The login and URL verbs are required
There are also 3 system variables (custom ones coming soon)
The system variables include:
`[ask,version,default]`These need to be started using a `$` and can be put anywhere except inside of a verb.
### `$ask`
The ask variable is special, and will prompt the user for the value when running the Knobfile
### `$default`
The default variable is the fallback value for when a user does not specify anything in an `$ask` prompt, and can be changed using the `SETDEFAULT` verb.
### `$version`
The version variable can be changed using the `VERSION` verb.Make sure the Dockerfile and Knobfile are both in the root directory!
### Have fun!