Skip to content

Commit ecb5fa4

Browse files
committed
Add a README for set-imgpkg-bundle-as-vendir-path
1 parent 416034c commit ecb5fa4

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# set-imgpkg-bundle-as-vendir-path GitHub Action
2+
3+
The **set-imgpkg-bundle-as-vendir-path** action sets an [imgpkg](https://carvel.dev/imgpkg/) bundle image as a [vendir](https://carvel.dev/vendir/) path. This is useful for managing environment promotion and release management via GitOps.
4+
5+
## Usage
6+
7+
This action sets a directory under the top-level `channels` directory in `vendir.yml` to a specified imgpkg bundle image. If `vendir.yml` does not exist, it will be created. The action ensures that the `channels` directory is always the first top-level directory in `vendir.yml` so that other configurations can reference it as needed.
8+
9+
Given a vendir.yml structured like this:
10+
11+
```yaml
12+
# vendir.yml
13+
apiVersion: vendir.k14s.io/v1alpha1
14+
kind: Config
15+
directories:
16+
- path: channels
17+
contents:
18+
- path: latest
19+
imgpkgBundle:
20+
image: registry.example.com/repository/bundle:build-1
21+
- path: environments
22+
contents:
23+
- path: development
24+
directory:
25+
path: channels/latest
26+
```
27+
28+
The following job will update the `imgpkgBundle` for channels/latest to use the `build-2` tag:
29+
30+
```yaml
31+
jobs:
32+
update-vendir:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: Update latest release channel
38+
uses: codebandits/github-actions/set-imgpkg-bundle-as-vendir-path@main
39+
with:
40+
channel_name: latest
41+
imgpkg_bundle_image: registry.example.com/repository/bundle:build-2
42+
bearer_token: ${{ secrets.SOME_BEARER_TOKEN }}
43+
```
44+
45+
## Inputs
46+
47+
- `channel_name`: **Required**. The path under the channels directory in vendir.yml to update.
48+
- `imgpkg_bundle_image`: **Required**. The published imgpkg bundle image.
49+
- `bearer_token`: Optional. The bearer token for authentication with the registry. Defaults to empty (no authentication).
50+
- `path`: Optional. The base directory path where vendir.yml is located. Defaults to `.` (current directory).
51+
52+
## Outputs
53+
54+
This action does not define any outputs.

0 commit comments

Comments
 (0)