Skip to content

Commit 3ba5fc5

Browse files
committed
add image build workflow
1 parent 6b0129c commit 3ba5fc5

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/image-build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Image Build
2+
3+
on:
4+
# configure manual trigger
5+
workflow_dispatch:
6+
7+
env:
8+
# The Dagger CLI uses the DAGGER_CLOUD_TOKEN environment variable to authenticate with Dagger Cloud
9+
DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }}
10+
11+
jobs:
12+
build-image:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install Dagger CLI
17+
run: cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sh; cd -; }
18+
- name: Generate and compile ci module
19+
run: dagger functions -m ci/
20+
- name: Build and publish module image
21+
env:
22+
HELM_IMAGE_REGISTRY_URL: ${{ secrets.HELM_IMAGE_REGISTRY_URL }}
23+
HELM_IMAGE_REGISTRY_REPOSITORY: ${{ secrets.HELM_IMAGE_REGISTRY_REPOSITORY }}
24+
HELM_IMAGE_REGISTRY_USER: ${{ secrets.HELM_IMAGE_REGISTRY_USER }}
25+
HELM_IMAGE_REGISTRY_PASSWORD: ${{ secrets.HELM_IMAGE_REGISTRY_PASSWORD }}
26+
run: |
27+
dagger -m ci/ \
28+
call publish \
29+
--registry env:HELM_IMAGE_REGISTRY_URL \
30+
--repository env:HELM_IMAGE_REGISTRY_REPOSITORY \
31+
--username env:HELM_IMAGE_REGISTRY_USER \
32+
--password env:HELM_IMAGE_REGISTRY_PASSWORD

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ dagger functions -m ./helm/
2626

2727
Basic development guide.
2828

29+
### Module Image
30+
31+
The Image used in the module is built by the [ci/](./ci/) Dagger module (publish function).
32+
33+
The [image-build](.github/workflows/image-build.yml) workflow builds and publishes the image.
34+
This action can be triggered manually. It uses the GitHub secrets for the needed credentials.
35+
2936
### Setup/update Dagger module
3037

3138
```bash

0 commit comments

Comments
 (0)