diff --git a/.github/workflows/build-n-push.yaml b/.github/workflows/build-n-push.yaml index 0360152..7d07c94 100644 --- a/.github/workflows/build-n-push.yaml +++ b/.github/workflows/build-n-push.yaml @@ -1,36 +1,32 @@ name: BuildnPush on: - workflow_call: + push: + branches: [ main ] + workflow_dispatch: inputs: IMAGE_REGISTRY: required: true - type: string - outputs: - IMAGE_PATH: - description: "Image Path" - value: ${{ jobs.image-build-n-push.outputs.IMAGE_PATH }} + type: string jobs: unit-tests: uses: ./.github/workflows/unit-tests.yaml + image-build-n-push: needs: [unit-tests] runs-on: ubuntu-latest - name: Builds container image and pushes to registry + name: Build multi-arch container image and push to registry env: IMAGE_REGISTRY: ${{ inputs.IMAGE_REGISTRY }} - outputs: - IMAGE_PATH: ${{ steps.print-docker-image-path.outputs.IMAGE_PATH }} steps: - - name: Checkout - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3 - - name: Set up QEMU + - name: Set up QEMU (multi-arch) uses: docker/setup-qemu-action@v2 with: - platforms: amd64 + platforms: all - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -38,9 +34,6 @@ jobs: - name: Log into GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin - - name: Build and Push Image - run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-build-push - - - name: Print Image Path - id: print-docker-image-path - run: echo IMAGE_PATH=`IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make print-docker-image-path` >> $GITHUB_OUTPUT + - name: Build and push multi-arch image + run: | + IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-build-push diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index fdd1ffc..e54f640 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -1,12 +1,6 @@ name: E2E Tests -on: - pull_request: {} - # workflow_run: - # workflows: ["BuildnPush"] - # types: - # - completed -concurrency: dev_environment +on: {} env: OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7bb0b92..c8b2025 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,10 +1,6 @@ name: Release -on: - push: - # Build and publish artifacts for a release - tags: - - "v*.*.*" +on: {} jobs: build: diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index b8ed7c2..43826c9 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -1,36 +1,35 @@ name: Unit Tests on: - workflow_call: {} - push: - branches-ignore: - - gh-pages + push: + branches: [ main ] + workflow_dispatch: + jobs: build-binary-n-test: - name: Build Binary locally and run unit tests + name: Build binary and run unit tests runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 - - name: Set up Go 1.x - uses: actions/setup-go@v2 + - name: Set up Go + uses: actions/setup-go@v4 with: - go-version: 1.19 - id: go + go-version: '1.21' - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: build the binary + - name: Build binary run: | go build -mod vendor -o dist/provider ./cmd/server/main.go - - - name: Run Unit Tests + + - name: Run unit tests run: | go test -covermode=count -coverprofile=profile.cov ./... - - - name: Send coverage + + - name: Upload coverage to Coveralls env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - GO111MODULE=off go get github.com/mattn/goveralls - $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github + go install github.com/mattn/goveralls@latest + goveralls -coverprofile=profile.cov -service=github diff --git a/README.md b/README.md index f9d0c44..185e5ce 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ Provider for OCI Vault allows you to get secrets stored in OCI Vault and mount t The provider is a gRPC server accessible via the Unix domain socket. It's interface is defined by the Secrets Store CSI driver. Secrets Store CSI Driver requests the provider's API in order to mount secrets onto the pods. +## Fork notice + +This repository is a fork of: +https://github.com/oracle/oci-secrets-store-csi-driver-provider/tree/arm-support + +Original project by Oracle. +This fork enables multi-architecture container images (amd64 + arm64) and custom CI builds. + ## Getting Started Please have a look at [Getting Started](./GettingStarted.md)