-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update repo template to test new .pot file generation
- Loading branch information
Showing
3 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: Detect unreleased dependencies | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
for reqfile in requirements.txt test-requirements.txt ; do | ||
if [ -f ${reqfile} ] ; then | ||
|
@@ -50,7 +50,7 @@ jobs: | |
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Install addons and dependencies | ||
|
@@ -66,6 +66,40 @@ jobs: | |
- uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Update .pot files | ||
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} | ||
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} | ||
- name: Prepare .pot files update | ||
run: | | ||
git reset --hard ${{ github.sha }} | ||
oca_export_and_commit_pot | ||
mkdir oca-ci-po-patch && touch oca-ci-po-patch/keep | ||
git format-patch --output-directory=oca-ci-po-patch --keep-subject @{u}..@ */i18n/*.po* | ||
if: matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: oca-ci-po-patch | ||
path: oca-ci-po-patch | ||
retention-days: 7 | ||
if: matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' | ||
push-pot: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.repository_owner == 'OCA' | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: oca-ci-po-patch | ||
path: oca-ci-po-patch | ||
- name: Configure git user | ||
run: | | ||
git config user.name "oca-ci" | ||
git config user.email "[email protected]" | ||
- name: Apply .pot files changes | ||
run: git am --keep oca-ci-po-patch/*.patch | ||
if: ${{ hashFiles('oca-ci-po-patch/*.patch') != '' }} | ||
- name: Push .pot file changes | ||
run: git push | ||
if: ${{ hashFiles('oca-ci-po-patch/*.patch') != '' }} | ||
# Don't fail in case something has changed upstream in the meantime | ||
continue-on-error: true |