Use MachineTranslation #105
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
on: | |
push: | |
branches: [ master ] | |
paths: | |
- workflow-templates/action.yml | |
- .github/workflows/sync-tests.yml | |
jobs: | |
copy: | |
strategy: | |
matrix: | |
repository: | |
- CreateWiki | |
- DataDump | |
- GlobalNewFiles | |
- ImportDump | |
- IncidentReporting | |
- MachineTranslation | |
- ManageWiki | |
- MatomoAnalytics | |
- MirahezeMagic | |
- PDFEmbed | |
- RemovePII | |
- RequestSSL | |
- RottenLinks | |
- WikiDiscover | |
- YouTube | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "GITHUB_REPOSITORY=${GITHUB_REPOSITORY}" >> $GITHUB_ENV | |
echo "GITHUB_SHA=${GITHUB_SHA}" >> $GITHUB_ENV | |
echo "GITHUB_ACTOR=${GITHUB_ACTOR}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract commit information | |
id: extract_commit | |
run: | | |
echo "short_message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT | |
echo "long_message=$(git log -1 --pretty=%b)" >> $GITHUB_OUTPUT | |
# Remove the checked-out repository to clean up | |
- name: Remove checked-out repository | |
run: rm -rf $GITHUB_WORKSPACE/.github | |
- name: Copy workflow | |
uses: andstor/copycat-action@v3 | |
with: | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
src_path: workflow-templates/action.yml | |
src_branch: master | |
dst_path: .github/workflows/mediawiki-tests.yml | |
dst_owner: miraheze | |
dst_repo_name: ${{ matrix.repository }} | |
dst_branch: master | |
commit_message: | | |
Update workflow: ${{ steps.extract_commit.outputs.short_message }} | |
${{ steps.extract_commit.outputs.long_message }} | |
from ${{ env.GITHUB_REPOSITORY }} (https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ env.GITHUB_SHA }}) | |
${{ env.GITHUB_ACTOR != 'Universal-Omega' && format('Co-authored-by: {0}', env.GITHUB_ACTOR) || '' }} |