Skip to content

Merge pull request #888 from geographika/mapserver-quickstart #74

Merge pull request #888 from geographika/mapserver-quickstart

Merge pull request #888 from geographika/mapserver-quickstart #74

Workflow file for this run

name: Update Locale
# This action runs:
# - When this file changes
# - When changes on documentation (doc)
# - When is triggered manually
on:
workflow_dispatch:
push:
permissions:
contents: read
jobs:
update-locale:
permissions:
contents: write # for Git to git push
name: Update Locale
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install apt packages
run: |
sudo apt-get install cmake cpanminus
sudo cpanm Text::SimpleTable::AutoWidth
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements.txt
- name: Extract branch name and commit hash
run: |
branch=${GITHUB_REF#refs/heads/}
git_hash=$(git rev-parse --short "$GITHUB_SHA")
echo "GIT_HASH=$git_hash" >> $GITHUB_ENV
- name: Initialize mandatory git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Update locale
run: |
mkdir build
bash .github/scripts/update_locale.sh
# Add the files, commit and push
git diff --staged --quiet || git commit -m "Locale update: for commit ${{ env.GIT_HASH }}"
git restore . # Remove the unstaged changes before rebasing
git push