Skip to content

Test template import #204

Test template import

Test template import #204

name: Update Configuration Steps Strings
on:
push:
paths:
- 'ardupilot_methodic_configurator/configuration_steps_*.json'
pull_request:
paths:
- 'ardupilot_methodic_configurator/configuration_steps_*.json'
# Run on schedule to catch any manual changes to files
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight
# Enable manual trigger
workflow_dispatch:
# prevent race conditions
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
update-strings:
permissions:
contents: write # for creating branches and commits
pull-requests: write # for creating PRs
runs-on: ubuntu-latest
env:
STRINGS_CHANGED: false
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.10'
- name: Generate configuration steps strings
run: |
python update_configuration_steps_translation.py
- name: Check for changes
run: |
git add ardupilot_methodic_configurator/configuration_steps_strings.py
if [ -n "$(git status --porcelain)" ]; then
echo "STRINGS_CHANGED=true" >> $GITHUB_ENV
else
echo "No changes to commit"
fi
- name: Create Pull Request
if: env.STRINGS_CHANGED == 'true'
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(configuration steps): Auto-update configuration steps translatable strings'
title: 'Update configuration steps translatable strings'
body: |
This PR updates the configuration_steps_strings.py file with new translatable strings.
These strings were automatically extracted from the configuration_steps_*.json files
and the configuration_steps_schema.json schema file.
This PR was triggered by changes to one or more configuration files.
branch: update-configuration-steps-strings
delete-branch: true
labels: automated-pr, i18n
reviewers: ${{ github.actor }}