-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b317db2
commit 56925b6
Showing
6 changed files
with
38 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ To trigger `krew-release-bot` you can use a `github-action` which sends the even | |
- To setup the action, add the following snippet after the step that publishes the new release and assets: | ||
```yaml | ||
- name: Update new version in krew-index | ||
uses: rajatjindal/[email protected].38 | ||
uses: rajatjindal/[email protected].40 | ||
``` | ||
Check out the `goreleaser` example below for details. | ||
|
||
|
@@ -28,29 +28,29 @@ name: release | |
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
- "v*.*.*" | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.16 | ||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update new version in krew-index | ||
uses: rajatjindal/[email protected].38 | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.16 | ||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update new version in krew-index | ||
uses: rajatjindal/[email protected].40 | ||
``` | ||
|
||
** You can also customize the release assets names, platforms for which build is done using .goreleaser.yml file in root of your git repo. | ||
\*\* You can also customize the release assets names, platforms for which build is done using .goreleaser.yml file in root of your git repo. | ||
|
||
# Examples using krew-release-bot in different ways | ||
|
||
|
@@ -62,24 +62,24 @@ jobs: | |
# Testing the template file | ||
|
||
You can test the template file rendering before check-in to the repo by running following command | ||
|
||
```bash | ||
$ docker run -v /path/to/your/template-file.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.38 \ | ||
$ docker run -v /path/to/your/template-file.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.40 \ | ||
krew-release-bot template --tag <tag-name> --template-file /tmp/template-file.yaml | ||
``` | ||
|
||
# Inputs for the action | ||
|
||
| Key | Default Value | Description | | ||
| ------------- | ------------- | ----------- | | ||
| workdir | `env.GITHUB_WORKSPACE` | Overrides the GitHub workspace directory path | | ||
| krew_template_file | `.krew.yaml` | The path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml | | ||
|
||
| Key | Default Value | Description | | ||
| ------------------ | ---------------------- | ------------------------------------------------------------------------------------ | | ||
| workdir | `env.GITHUB_WORKSPACE` | Overrides the GitHub workspace directory path | | ||
| krew_template_file | `.krew.yaml` | The path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml | | ||
|
||
# Limitations of krew-release-bot | ||
|
||
- only works for repos hosted on github right now | ||
- The first version of plugin has to be submitted manually, by plugin author, to the krew-index repo | ||
|
||
|
||
# Kubernetes CLA | ||
|
||
krew-release-bot is just a service to open PR on your behalf to release a new version of the krew-plugin. Your CLA agreement (that you did when submitting the new plugin to krew-index) is still applicable on these PR's. | ||
krew-release-bot is just a service to open PR on your behalf to release a new version of the krew-plugin. Your CLA agreement (that you did when submitting the new plugin to krew-index) is still applicable on these PR's. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# action.yml | ||
name: 'krew-release-bot' | ||
description: 'automatically opens PR for upstream krew-index repo when you publish new release of your awesome plugin' | ||
name: "krew-release-bot" | ||
description: "automatically opens PR for upstream krew-index repo when you publish new release of your awesome plugin" | ||
runs: | ||
using: 'docker' | ||
image: 'docker://rajatjindal/krew-release-bot:v0.0.39' | ||
using: "docker" | ||
image: "docker://rajatjindal/krew-release-bot:v0.0.40" | ||
inputs: | ||
workdir: | ||
description: 'Working directory, defaults to env.GITHUB_WORKSPACE' | ||
description: "Working directory, defaults to env.GITHUB_WORKSPACE" | ||
krew_template_file: | ||
description: 'the path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml. defaults to .krew.yaml' | ||
description: "the path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml. defaults to .krew.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /bin/bash | ||
|
||
VERSION=v0.0.39 | ||
VERSION=v0.0.40 | ||
docker run --rm -v `pwd`:/home/app rajatjindal/krew-release-bot:$VERSION krew-release-bot template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters