Add CI workflow and update Makefile-docker #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and run docker compose | |
on: | |
push: | |
branches: | |
- master | |
- docker-action # For testing the PR | |
jobs: | |
docker: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start containers | |
run: | | |
docker compose pull | |
make initialize_docker | |
- name: Set Environment Variables | |
run: | | |
echo "DATE=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV | |
echo "REV=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "MESSAGE='Extracted l10n messages from ${{ env.DATE }} at ${{ env.REV}}'" >> $GITHUB_ENV | |
echo "ROBOT_EMAIL='addons-dev-automation+github@mozilla.com'" >> $GITHUB_ENV | |
echo "ROBOT_NAME='Mozilla Add-ons Robot'" >> $GITHUB_ENV | |
echo """ | |
name: ${{ env.ROBOT_NAME }} | |
email: ${{ env.ROBOT_EMAIL }} | |
date: ${{ env.DATE }} | |
rev: ${{ env.rev }} | |
message: ${{ env.MESSAGE }} | |
""" | |
- name: Extract Locales | |
run: make extract_locales | |
- name: Push Locales | |
run: | | |
git config --global user.name ${{ env.ROBOT_NAME }} | |
git config --global user.email ${{ env.ROBOT_EMAIL }} | |
git commit -a -m "${{ env.MESSAGE }}" | |
git push" |