Skip to content

Commit

Permalink
chore: Move Replexica to run on pushes to main (#16394)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithwillcode authored and zomars committed Sep 4, 2024
1 parent 37b7c7f commit 40c9330
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run i18n AI automation
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-main
cancel-in-progress: false

jobs:
i18n:
name: Run i18n
runs-on: buildjet-2vcpu-ubuntu-2204
permissions:
actions: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: replexica/replexica@main
env:
GH_TOKEN: ${{ github.token }}
with:
api-key: ${{ secrets.CI_REPLEXICA_API_KEY }}
pull-request: true
23 changes: 0 additions & 23 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,6 @@ jobs:
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/yarn-install.yml

i18n:
name: Run i18n
runs-on: buildjet-2vcpu-ubuntu-2204
permissions:
actions: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
# Doing this custom checkout of the common.json files from the PR since we don't
# want to checkout the entire branch for security reasons as this job is granted
# write permissions.
- run: git fetch --depth=2 origin ${{ github.event.pull_request.head.sha }}
if: ${{ github.event.pull_request.head.sha != '' }}
- run: find apps/web/public/static/locales/** -name "common.json" | xargs git checkout ${{ github.event.pull_request.head.sha }} --
if: ${{ github.event.pull_request.head.sha != '' }}
shell: bash
- run: git checkout ${{ github.event.pull_request.head.sha }} -- i18n.json
if: ${{ github.event.pull_request.head.sha != '' }}
- uses: replexica/replexica@main
with:
api-key: ${{ secrets.CI_REPLEXICA_API_KEY }}

type-check:
name: Type check
needs: [changes, check-label, deps]
Expand Down

0 comments on commit 40c9330

Please sign in to comment.