Skip to content

Commit

Permalink
chore: add deployment yamls to release (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorTurFer authored Aug 22, 2023
1 parent 04204c2 commit 1986161
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Release Deployment YAML file
run: make release
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand All @@ -36,3 +41,34 @@ jobs:
run: make publish-multiarch
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

# Get release information to determine id of the current release
- name: Get Release
id: get-release-info
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Upload deployment YAML file to GitHub release
- name: Upload Deployment YAML file
id: upload-deployment-yaml
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/kedacore/keda/releases/${{ steps.get-release-info.outputs.id }}/assets?name=keda-http-add-on-${{ steps.get_version.outputs.VERSION }}.yaml
asset_path: keda-http-add-on-${{ steps.get_version.outputs.VERSION }}.yaml
asset_name: keda-http-add-on-${{ steps.get_version.outputs.VERSION }}.yaml
asset_content_type: application/x-yaml

# Upload CRD deployment YAML file to GitHub release
- name: Upload Deployment YAML file
id: upload-crd-deployment-yaml
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/kedacore/keda/releases/${{ steps.get-release-info.outputs.id }}/assets?name=keda-http-add-on-${{ steps.get_version.outputs.VERSION }}-crds.yaml
asset_path: keda-http-add-on-${{ steps.get_version.outputs.VERSION }}-crds.yaml
asset_name: keda-http-add-on-${{ steps.get_version.outputs.VERSION }}-crds.yaml
asset_content_type: application/x-yaml
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This changelog keeps track of work items that have been completed and are ready

### New

- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO))
- **General**: Add manifests to deploy the Add-on ([#716](https://github.com/kedacore/http-add-on/issues/716))

### Improvements

Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ publish-scaler-multiarch:

publish-multiarch: publish-operator-multiarch publish-interceptor-multiarch publish-scaler-multiarch

release: manifests kustomize ## Produce new KEDA Http Add-on release in keda-http-add-on-$(VERSION).yaml file.
cd config/interceptor && \
$(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-interceptor=${IMAGE_INTERCEPTOR_VERSIONED_TAG}
cd config/scaler && \
$(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-scaler=${IMAGE_SCALER_VERSIONED_TAG}
cd config/operator && \
$(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-operator=${IMAGE_OPERATOR_VERSIONED_TAG}
$(KUSTOMIZE) build config/default > keda-http-add-on-$(VERSION).yaml
$(KUSTOMIZE) build config/crd > keda-http-add-on-$(VERSION)-crds.yaml

# Development

generate: codegen manifests mockgen ## Generate code, manifests, and mocks.
Expand Down

0 comments on commit 1986161

Please sign in to comment.