Skip to content

Use docker compose for building and running container (local and CI) (github action and circleCI) #1188

Use docker compose for building and running container (local and CI) (github action and circleCI)

Use docker compose for building and running container (local and CI) (github action and circleCI) #1188

name: Extract Locales
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
extract_locales:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Build Docker image
id: build
uses: ./.github/actions/build-docker
with:
target: development
- name: Extract Locales
uses: ./.github/actions/run-docker
with:
version: ${{ steps.build.outputs.version }}
compose_file: docker-compose.olympia.yml
run: |
make extract_locales
- name: Push Locales (dry-run)
if: github.event_name == 'pull_request'
shell: bash
run: |
if [[ ${{ github.event.pull_request.head.repo.fork}} == 'true' ]]; then
echo """
Github actions are not authorized to push from workflows triggered by forks.
We cannot verify if the l10n extraction push will work or not.
Please submit a PR from the base repository if you are modifying l10n extraction scripts.
"""
exit 0
fi
make push_locales ARGS="--dry-run"
- name: Push Locales
if: github.event_name == 'push'
shell: bash
run: |
make push_locales