Skip to content

chore(do not merge): demo of template files fix #3711

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
11 changes: 9 additions & 2 deletions .github/scripts/update_generation_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ set -e
function get_latest_released_version() {
local group_id=$1
local artifact_id=$2
latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1)
echo "${latest}"
json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json")
latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1)
if [[ -z "${latest}" ]]; then
echo "The latest version of ${group_id}:${artifact_id} is empty."
echo "The returned json from maven.org is invalid: ${json_content}"
exit 1
else
echo "${latest}"
fi
}

# Update a key to a new value in the generation config.
Expand Down
6 changes: 6 additions & 0 deletions .github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
trustedContributors:
- renovate-bot
- gcf-owl-bot[bot]

annotations:
- type: comment
text: "/gcbrun"
- type: label
text: "kokoro:force-run"
6 changes: 4 additions & 2 deletions .github/workflows/update_generation_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ on:

jobs:
update-generation-config:
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
env:
# the branch into which the pull request is merged
base_branch: main
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- name: Update params in generation config to latest
shell: bash
Expand All @@ -36,7 +37,8 @@ jobs:
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
bash .github/scripts/update_generation_config.sh \
--base_branch "${base_branch}"\
--base_branch "${base_branch}" \
--repo ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}

Loading