Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish manifests automatically when released #422

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is allowed gitactions by OGHO. please get it reviewed by @Djelibeybi

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Djelibeybi,
Could you pls review this git action and confirm whether we can use this or not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in the list of allowed actions. You'd either have to replace it, fork it or request approval for it.

env:
GITHUB_TOKEN: ${{ github.token }}

- name: upload manifests
uses: shogo82148/actions-upload-release-asset@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is allowed gitactions by OGHO. please get it reviewed by @Djelibeybi

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Djelibeybi,
Could you pls review this git action and confirm whether we can use this or not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in the list of allowed actions. You'd either have to replace it, fork it or request approval for it.

with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ github.ref_name }}/*.yaml
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,7 +38,11 @@ else
VERSION ?= ${VERSION}
endif

RELEASE = v1.25.0
ifeq "$(RELEASE)" ""
RELEASE = latest
else
RELEASE ?= ${RELEASE}
endif

GOOS ?= linux
ARCH ?= amd64
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions manifests/container-storage-interface/storage-class.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
Expand Down
1 change: 1 addition & 0 deletions manifests/volume-provisioner/storage-class.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
Expand Down