prevent unsupported locale setting error in GHA

related to https://github.com/ansible/ansible/pull/78175

the way the GHA runner is built, Python runs with a mixed locale between the FS bits and the default encoding, which can cause unpredictable issues

adding env var `LC_ALL: "C.UTF-8"` prevent flakiness due to locale issue

Signed-off-by: Hao Liu <haoli@redhat.com>
This commit is contained in:
Hao Liu
2022-11-29 13:03:46 -05:00
committed by GitHub
parent 01c6ac1b14
commit 40499a4084
7 changed files with 20 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
name: CI name: CI
env: env:
BRANCH: ${{ github.base_ref || 'devel' }} BRANCH: ${{ github.base_ref || 'devel' }}
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
pull_request: pull_request:
jobs: jobs:

View File

@@ -1,5 +1,7 @@
--- ---
name: Build/Push Development Images name: Build/Push Development Images
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
push: push:
branches: branches:

View File

@@ -1,5 +1,8 @@
--- ---
name: E2E Tests name: E2E Tests
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
pull_request_target: pull_request_target:
types: [labeled] types: [labeled]

View File

@@ -1,5 +1,7 @@
--- ---
name: Feature branch deletion cleanup name: Feature branch deletion cleanup
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
delete: delete:
branches: branches:

View File

@@ -1,5 +1,9 @@
--- ---
name: Promote Release name: Promote Release
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
release: release:
types: [published] types: [published]

View File

@@ -1,5 +1,9 @@
--- ---
name: Stage Release name: Stage Release
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:

View File

@@ -1,5 +1,9 @@
--- ---
name: Upload API Schema name: Upload API Schema
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on: on:
push: push:
branches: branches: