Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update workflow and make it reusable#315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Dumeng merged 26 commits intopython:masterfromDumeng:master
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
26 commits
Select commitHold shift + click to select a range
a67273b
Update to Python 3.11
BlueGlassBlockFeb 27, 2023
8602d5e
Update python-311.yml
BlueGlassBlockFeb 27, 2023
3554fc2
Fix transifex cli position
BlueGlassBlockFeb 27, 2023
c259ee1
Fix config generation script
BlueGlassBlockFeb 28, 2023
6d03983
Add 3.11 to workflows
BlueGlassBlockFeb 28, 2023
c3d4b1a
chore: update 3.11 links and badges
BlueGlassBlockMay 13, 2023
e01effb
chore: Add 3.12 to workflow
BlueGlassBlockMay 29, 2023
b40b5b2
Commit
DumengJun 20, 2023
0738865
commit
DumengJun 20, 2023
2e03473
Remove token
DumengJun 20, 2023
2a26dfb
fix
DumengJun 21, 2023
3040c4b
remove venv
DumengJun 21, 2023
1599860
faster
DumengJun 21, 2023
296c3d3
search
DumengJun 21, 2023
52551de
cache
DumengJun 21, 2023
73af92c
update cache path
DumengJun 21, 2023
7c46dfd
remove cache
DumengJun 21, 2023
c6da1da
Add reusable workflow
DumengAug 3, 2023
f48c031
Merge branch 'master' into master
DumengAug 3, 2023
2200481
Update all workflows
DumengAug 3, 2023
7ab7c93
Update workflows schedule
DumengAug 3, 2023
0147e2b
Use docsbuild-scripts to build
DumengAug 3, 2023
345361d
install python docs packages
DumengAug 3, 2023
8bb7d44
Add docsbuild-scripts repo
DumengAug 3, 2023
0aa5646
remvoe docsbuild-scripts
DumengAug 3, 2023
c2b3e96
Add env setup
DumengAug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions.github/scripts/build.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,5 +13,5 @@ error() {
cd cpython/Doc || exit 1
mkdir -p locales/"$LOCALE"/
ln -sfn "$(realpath ../../docs)" locales/"$LOCALE"/LC_MESSAGES
make venv
make html SPHINXOPTS="-D language=$LOCALE -D gettext_compact=0 -W --keep-going -j2" 2> >(error)
pip3 install -q -r requirements.txt
make html SPHINXOPTS="-D language=$LOCALE -D gettext_compact=0 -W --keep-going" 2> >(error)
3 changes: 1 addition & 2 deletions.github/scripts/commit.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,5 +11,4 @@ if ! git status -s|grep '\.po'; then
fi
git add .
git commit -m '[po] auto sync'
header="$(echo -n token:"$GITHUB_TOKEN" | base64)"
git -c http.extraheader="AUTHORIZATION: basic $header" push
git push
8 changes: 1 addition & 7 deletions.github/scripts/prepare.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,10 +2,4 @@

set -ex

git clone --depth=1 --branch="$VERSION" https://github.com/python/cpython cpython
git clone --branch="$VERSION" https://github.com/"$GITHUB_REPOSITORY" docs

pip3 install --user setuptools
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
sudo apt-get update
sudo apt-get install -y python3-venv
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
3 changes: 1 addition & 2 deletions.github/scripts/update.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
#!/bin/bash

tx=$(realpath ./tx)
cd docs || exit 1
$tx pull --languages "$LOCALE" -t --use-git-timestamps
$(realpath ../tx) pull --languages "$LOCALE" -t --use-git-timestamps --workers 25 --silent
25 changes: 6 additions & 19 deletions.github/workflows/python-310.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,12 @@ on:
branches:
- master
schedule:
- cron: "8 * * * *"
- cron: "26 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.10"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.10"
secrets: inherit

25 changes: 6 additions & 19 deletions.github/workflows/python-311.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,12 @@ on:
branches:
- master
schedule:
- cron: "11 * * * *"
- cron: "38 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.11"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.11"
secrets: inherit

24 changes: 5 additions & 19 deletions.github/workflows/python-312.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,11 @@ on:
branches:
- master
schedule:
- cron: "42 * * * *"
- cron: "50 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.12"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.12"
secrets: inherit
24 changes: 5 additions & 19 deletions.github/workflows/python-37.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,11 @@ on:
branches:
- master
schedule:
- cron: "53 * * * *"
- cron: "0 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.7"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.7"
secrets: inherit
24 changes: 5 additions & 19 deletions.github/workflows/python-38.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,11 @@ on:
branches:
- master
schedule:
- cron: "38 * * * *"
- cron: "2 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.8"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.8"
secrets: inherit
25 changes: 6 additions & 19 deletions.github/workflows/python-39.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,25 +5,12 @@ on:
branches:
- master
schedule:
- cron: "23 * * * *"
- cron: "14 * * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: "3.9"
steps:
- uses: actions/checkout@v2
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/sync.yml
with:
version: "3.9"
secrets: inherit

41 changes: 41 additions & 0 deletions.github/workflows/sync.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
name: Reusable workflow example

on:
workflow_call:
inputs:
version:
required: true
type: string
secrets:
TRANSIFEX_APIKEY:
required: true

jobs:
sync:
runs-on: ubuntu-latest
env:
LOCALE: zh_CN
VERSION: ${{ inputs.version }}
steps:
- uses: actions/checkout@v3
- name: Checkout CPython
uses: actions/checkout@v3
with:
repository: 'python/cpython'
ref: ${{env.VERSION}}
path: cpython
- name: Checkout Current Branch
uses: actions/checkout@v3
with:
ref: ${{env.VERSION}}
path: docs
- name: prepare
run: .github/scripts/prepare.sh
- name: update
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: build
run: .github/scripts/build.sh
- name: commit
run: .github/scripts/commit.sh

[8]ページ先頭

©2009-2025 Movatter.jp