-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 1.16 KB
/
image-build.yml
File metadata and controls
35 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Image Build
on:
push:
branches:
- main
# configure manual trigger
workflow_dispatch:
env:
# The Dagger CLI uses the DAGGER_CLOUD_TOKEN environment variable to authenticate with Dagger Cloud
DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }}
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dagger CLI
run: cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sh; cd -; }
- name: Generate and compile ci module
run: dagger functions -m ci/
- name: Build and publish module image
env:
HELM_IMAGE_REGISTRY_URL: ghcr.io
HELM_IMAGE_REGISTRY_REPOSITORY: ${{ github.repository }}/dagger-module-helm
HELM_IMAGE_REGISTRY_USER: ${{ github.actor }}
HELM_IMAGE_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
dagger -m ci/ \
call publish \
--registry ${HELM_IMAGE_REGISTRY_URL} \
--repository ${HELM_IMAGE_REGISTRY_REPOSITORY} \
--username ${HELM_IMAGE_REGISTRY_USER} \
--password env:HELM_IMAGE_REGISTRY_PASSWORD