Skip to content

Commit

Permalink
feat(ci): scrape latest CK runtime available
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Mar 13, 2023
1 parent 46edffe commit 7b04cd9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/automatic-updates/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ runs:
run: |
make generate
make update-docs
make update-default-ck-runtime
git add -A && git commit -m 'chore: nightly resource refresh' && echo "refresh=1" >> $GITHUB_ENV || echo "No changes to make update-docs"
- name: Push changes
shell: bash
Expand Down
28 changes: 28 additions & 0 deletions script/update_default_ck_runtime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

set -e

location=$(dirname $0)

git clone --depth 1 https://github.com/apache/camel-k-runtime.git /tmp/camel-k-runtime
ck_runtime_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f /tmp/camel-k-runtime/pom.xml)
echo "INFO: last Camel K runtime version set at $ck_runtime_version"
sed -i "s/^RUNTIME_VERSION := .*$/RUNTIME_VERSION := $ck_runtime_version/" $location/Makefile
rm -rf /tmp/camel-k-runtime/

0 comments on commit 7b04cd9

Please sign in to comment.