From 4d6dd966a47cb37839e2248053d7ff8dc99a2f93 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 9 Sep 2024 14:56:52 -0700 Subject: [PATCH] Build openbao-csi-provider container image --- .../workflows/build-openbao-csi-provider.yaml | 22 +++++++++++++++++++ containers/openbao-csi-provider/Containerfile | 9 ++++++++ 2 files changed, 31 insertions(+) create mode 100644 .forgejo/workflows/build-openbao-csi-provider.yaml create mode 100644 containers/openbao-csi-provider/Containerfile diff --git a/.forgejo/workflows/build-openbao-csi-provider.yaml b/.forgejo/workflows/build-openbao-csi-provider.yaml new file mode 100644 index 0000000..c252cb5 --- /dev/null +++ b/.forgejo/workflows/build-openbao-csi-provider.yaml @@ -0,0 +1,22 @@ +on: + push: + paths: + - containers/openbao-csi-provider/* + - .forgejo/workflows/build-openbao-csi-provider.yaml +jobs: + build-openbao-csi-provider: + runs-on: docker + container: + image: library/docker:dind + steps: + - run: apk add --no-cache nodejs git + - name: login to container registry + run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login --username ${{ secrets.DEPLOY_USER }} --password-stdin git.janky.solutions + - name: build container image + uses: docker/build-push-action@v6 + with: + file: Containerfile + context: "{{defaultContext}}:containers/openbao-csi-provider" + tags: git.janky.solutions/jankysolutions/infra/openbao-csi-provider:latest + platforms: linux/amd64 + push: true diff --git a/containers/openbao-csi-provider/Containerfile b/containers/openbao-csi-provider/Containerfile new file mode 100644 index 0000000..61ee7e3 --- /dev/null +++ b/containers/openbao-csi-provider/Containerfile @@ -0,0 +1,9 @@ +FROM library/golang:1.22 AS build +ENV CGO_ENABLED=0 +RUN git clone -b v1.4.0 https://github.com/openbao/openbao-csi-provider /openbao-csi-provider +WORKDIR /openbao-csi-provider +RUN go build -o openbao-csi-provider + +FROM gcr.io/distroless/static-debian12:latest +COPY --from=build /openbao-csi-provider/openbao-csi-provider /bin/ +ENTRYPOINT [ "/bin/openbao-csi-provider" ]