Skip to content

Update Skill

Update Skill #3

Workflow file for this run

# Copyright 2026 Google LLC
#
# Licensed 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.
name: Update Skill
on:
release:
types: [published]
workflow_dispatch:
jobs:
update-skill:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for tags and diffs
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Generate Diff
run: |
# The new release tag is GITHUB_REF_NAME when triggered on release
# Find the tag immediately preceding this one
PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${GITHUB_REF_NAME}^ 2>/dev/null || echo "")
if [ -z "$PREVIOUS_TAG" ]; then
# If no previous tag, diff against the initial commit
INITIAL_COMMIT=$(git rev-list --max-parents=0 HEAD)
git diff $INITIAL_COMMIT..HEAD > release_diff.patch
else
git diff $PREVIOUS_TAG..$GITHUB_REF_NAME > release_diff.patch
fi
- name: Update Skill via Gemini
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
python .github/scripts/update_skill.py
rm release_diff.patch
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
commit-message: "docs: update SKILL.md based on release ${{ github.ref_name }}"
author: googlemaps-bot <googlemaps-bot@google.com>
committer: googlemaps-bot <googlemaps-bot@google.com>
title: "docs: update SKILL.md for release ${{ github.ref_name }}"
body: "Automatically generated PR to update `SKILL.md` for the latest release `${{ github.ref_name }}`."
branch: "update-skill-for-${{ github.ref_name }}"
base: main
labels: |
docs
automerge