diff --git a/.github/workflows/flux-notification-controller-image.yaml b/.github/workflows/flux-notification-controller-image.yaml new file mode 100644 index 0000000..331dbf8 --- /dev/null +++ b/.github/workflows/flux-notification-controller-image.yaml @@ -0,0 +1,28 @@ +name: Build & push notification-controller image +on: + pull_request: + push: + paths: + - '.github/workflows/flux-notification-controller-image.yaml' + - 'dockerfiles/flux-notification-controller.Dockerfile' + branches: + - main + +jobs: + docker: + runs-on: ubuntu-latest + name: Build docker image + steps: + - uses: actions/checkout@master + + - name: 'Artifact: build && push fluxcd/notification-controller image' + uses: aevea/action-kaniko@v0.10.0 + with: + registry: artifact.onwalk.net + username: admin + password: ${{ secrets.HELM_REPO_PASSWORD }} + build_file: dockerfiles/flux-notification-controller.Dockerfile + image: k8s/fluxcd/notification-controller + tag: v0.24.0 + cache: true + cache_registry: cache diff --git a/dockerfiles/flux-notification-controller.Dockerfile b/dockerfiles/flux-notification-controller.Dockerfile new file mode 100755 index 0000000..86b94ff --- /dev/null +++ b/dockerfiles/flux-notification-controller.Dockerfile @@ -0,0 +1,10 @@ +FROM ghcr.io/fluxcd/notification-controller:v0.24.0 as build + +FROM artifact.onwalk.net/k8s/alpine-ca:3.13 as prod + +LABEL org.opencontainers.image.source="https://github.com/fluxcd/notification-controller" +RUN apk add --no-cache ca-certificates tini +COPY --from=build /usr/local/bin/notification-controller /usr/local/bin/ +USER 65534:65534 + +ENTRYPOINT [ "/sbin/tini", "--", "notification-controller" ]