diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 56591c42cb..b37874c652 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,10 +9,11 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: write-all steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -30,3 +31,18 @@ jobs: - name: Push Image run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make docker-push-all + + - name: Make manifests + run: RELEASE=${{ github.ref_name }} make manifests + + - name: Get current release + id: get_release + uses: bruceadams/get-release@v1.3.2 + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: upload manifests + uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ${{ github.ref_name }}/*.yaml \ No newline at end of file diff --git a/Makefile b/Makefile index cb75cfb17d..f650ca38d9 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ else endif ifeq "$(OSS_REGISTRY)" "" - OSS_REGISTRY ?= iad.ocir.io/oracle + OSS_REGISTRY ?= ghcr.io/oracle else OSS_REGISTRY ?= ${OSS_REGISTRY} endif @@ -38,7 +38,11 @@ else VERSION ?= ${VERSION} endif -RELEASE = v1.25.0 +ifeq "$(RELEASE)" "" + RELEASE = latest +else + RELEASE ?= ${RELEASE} +endif GOOS ?= linux ARCH ?= amd64 @@ -87,9 +91,11 @@ build: build-dirs .PHONY: manifests manifests: build-dirs @mkdir -p ${RELEASE} - @cp -a manifests/**/*.yaml ${RELEASE} + @rsync -av --exclude=manifests/**/storage-class.yaml manifests/**/*.yaml ${RELEASE} + @cp -a manifests/container-storage-interface/storage-class.yaml ${RELEASE}/storage-class.yaml + @cat manifests/volume-provisioner/storage-class.yaml >> ${RELEASE}/storage-class.yaml @sed $(SED_INPLACE) \ - 's#${IMAGE}:${VERSION}#${IMAGE}:${RELEASE}#g' \ + 's#${IMAGE}:.*#${IMAGE}:${RELEASE}#g' \ ${RELEASE}/*.yaml .PHONY: vendor @@ -200,5 +206,4 @@ test-local: build-dirs .PHONY: run-ccm-e2e-tests-local run-ccm-e2e-tests-local: - ./hack/run_e2e_test.sh - + ./hack/run_e2e_test.sh \ No newline at end of file diff --git a/manifests/container-storage-interface/storage-class.yaml b/manifests/container-storage-interface/storage-class.yaml index 318f0d3c27..23235157dc 100644 --- a/manifests/container-storage-interface/storage-class.yaml +++ b/manifests/container-storage-interface/storage-class.yaml @@ -1,3 +1,4 @@ +--- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: diff --git a/manifests/volume-provisioner/storage-class.yaml b/manifests/volume-provisioner/storage-class.yaml index 6b8e0b1e56..9be7164ff0 100644 --- a/manifests/volume-provisioner/storage-class.yaml +++ b/manifests/volume-provisioner/storage-class.yaml @@ -1,3 +1,4 @@ +--- kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: