| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,43 +1,48 @@ | |||
| 1 | - # Modification along rffontenelle/python-docs-pt-br | ||
| 1 | + # Adapted from python/python-docs-pt-br | ||
| 2 | + # Original (replaced update.yml): https://github.com/python/python-docs-pt-br/blob/main/.github/workflows/sync.yml | ||
| 2 | 3 | name: Update translations | |
| 3 | 4 | ||
| 4 | 5 | on: | |
| 5 | 6 | workflow_dispatch: | |
| 6 | 7 | schedule: | |
| 7 | 8 | - cron: '40 23 * * *' | |
| 8 | - #push: | ||
| 9 | - # paths: | ||
| 10 | - # - '.github/workflows/update.yml' | ||
| 11 | - # - 'scripts/update.sh' | ||
| 12 | - # branches: | ||
| 13 | - # - '3.11' | ||
| 9 | + | ||
| 10 | + permissions: | ||
| 11 | + contents: read | ||
| 14 | 12 | ||
| 15 | 13 | env: | |
| 16 | - CPYTHON_BRANCH: '3.14' | ||
| 14 | + CPYTHON_BRANCH: '3.15' | ||
| 17 | 15 | LANGUAGE: 'ja' | |
| 16 | + TX_CLI_VERSION: '1.6.17' | ||
| 18 | 17 | ||
| 19 | 18 | jobs: | |
| 20 | 19 | update: | |
| 21 | 20 | # Job to pull translation from Transifex platform, and commit & push changes | |
| 22 | 21 | runs-on: ubuntu-latest | |
| 22 | + permissions: | ||
| 23 | + contents: write | ||
| 23 | 24 | steps: | |
| 24 | 25 | - name: Check out ${{ github.repository }} | |
| 25 | - uses: actions/checkout@v4 | ||
| 26 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 27 | + with: | ||
| 28 | + ref: ${{ env.CPYTHON_BRANCH }} | ||
| 26 | 29 | - name: Check out CPython | |
| 27 | - uses: actions/checkout@v4 | ||
| 30 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 28 | 31 | with: | |
| 29 | 32 | repository: python/cpython | |
| 30 | 33 | persist-credentials: false | |
| 31 | 34 | ref: ${{ env.CPYTHON_BRANCH }} | |
| 32 | 35 | path: cpython | |
| 33 | 36 | - name: Set up Python | |
| 34 | - uses: actions/setup-python@v5 | ||
| 37 | + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| 35 | 38 | with: | |
| 39 | + python-version: ${{ env.CPYTHON_BRANCH }} | ||
| 40 | + allow-prereleases: true | ||
| 36 | 41 | cache: 'pip' | |
| 37 | 42 | cache-dependency-path: '**/requirements*.txt' | |
| 38 | 43 | - name: Install Transifex CLI | |
| 39 | 44 | run: | | |
| 40 | - curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash | ||
| 45 | + curl -fsSL https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash -s -- "v${TX_CLI_VERSION}" | ||
| 41 | 46 | working-directory: /usr/local/bin | |
| 42 | 47 | - name: Install dependencies | |
| 43 | 48 | run: | | |
@@ -69,24 +74,30 @@ jobs: | |||
| 69 | 74 | needs: [update] | |
| 70 | 75 | strategy: | |
| 71 | 76 | matrix: | |
| 72 | - branch: [ "3.13", "3.12", "3.11" ] | ||
| 77 | + branch: [ "3.14", "3.13", "3.12", "3.11" ] | ||
| 73 | 78 | ||
| 74 | 79 | runs-on: ubuntu-latest | |
| 80 | + permissions: | ||
| 81 | + contents: write | ||
| 75 | 82 | steps: | |
| 76 | 83 | - name: Check out source branch (${{ env.CPYTHON_BRANCH }}) | |
| 77 | - uses: actions/checkout@v4 | ||
| 84 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 78 | 85 | with: | |
| 86 | + ref: ${{ env.CPYTHON_BRANCH }} | ||
| 79 | 87 | path: ${{ env.CPYTHON_BRANCH }} | |
| 88 | + persist-credentials: false | ||
| 80 | 89 | ||
| 81 | 90 | - name: Check out target branch (${{ matrix.branch }}) | |
| 82 | - uses: actions/checkout@v4 | ||
| 91 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 83 | 92 | with: | |
| 84 | 93 | ref: ${{ matrix.branch }} | |
| 85 | 94 | path: ${{ matrix.branch }} | |
| 86 | 95 | ||
| 87 | 96 | - name: Set up Python | |
| 88 | - uses: actions/setup-python@v5 | ||
| 97 | + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| 89 | 98 | with: | |
| 99 | + python-version: ${{ env.CPYTHON_BRANCH }} | ||
| 100 | + allow-prereleases: true | ||
| 90 | 101 | cache: 'pip' | |
| 91 | 102 | cache-dependency-path: '**/requirements*.txt' | |
| 92 | 103 | ||
@@ -96,7 +107,9 @@ jobs: | |||
| 96 | 107 | pip install pomerge powrap | |
| 97 | 108 | ||
| 98 | 109 | - name: Merge overwriting on stable release branch | |
| 110 | + shell: bash | ||
| 99 | 111 | run: | | |
| 112 | + shopt -s globstar nullglob | ||
| 100 | 113 | pomerge --from "${{ env.CPYTHON_BRANCH }}"/**/*.po --to "${{ matrix.branch }}"/**/*.po | |
| 101 | 114 | ||
| 102 | 115 | - name: Wrap catalog message files | |
@@ -112,4 +125,3 @@ jobs: | |||
| 112 | 125 | git status | |
| 113 | 126 | git add -A | |
| 114 | 127 | git diff-index --quiet HEAD || ( git commit -m "Merge ${{ env.CPYTHON_BRANCH }} into ${{ matrix.branch }}" && git push ) | |
| 115 | - | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments