@@ -25,22 +25,24 @@ jobs:
2525 runs-on : ubuntu-latest
2626 steps :
2727 - name : Check out ${{ github.repository }}
28- uses : actions/checkout@v2
28+ uses : actions/checkout@v3
2929 - name : Check out CPython
30- uses : actions/checkout@v2
30+ uses : actions/checkout@v3
3131 with :
3232 repository : python/cpython
3333 persist-credentials : false
3434 ref : ${{ env.CPYTHON_BRANCH }}
3535 path : cpython
3636 - name : Set up Python 3.9
37- uses : actions/setup-python@v2
37+ uses : actions/setup-python@v4
3838 with :
3939 python-version : ' 3.9'
40+ cache : ' pip'
41+ cache-dependency-path : ' **/requirements*.txt'
4042 - name : Install Transifex CLI
4143 run : |
4244 curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
43- mv tx /usr/local/bin/tx
45+ working-directory : /usr/local/bin
4446 - name : Install dependencies
4547 run : |
4648 sudo apt update -y && sudo apt install gettext -y
5658 run : |
5759 powrap --modified
5860 - name : Commit and push changes
59- if : github.repository == 'python/python-docs-pt-br'
61+ if : |
62+ github.repository == 'python/python-docs-pt-br' &&
63+ ! github.event_name == 'pull_request'
6064 run : |
6165 git config user.name github-actions
6266 git config user.email github-actions@github.com
@@ -85,15 +89,19 @@ jobs:
8589 run :
8690 echo "CURRENT_BRANCH=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
8791 - name : Check out source branch (${{ env.CURRENT_BRANCH }})
88- uses : actions/checkout@v2
92+ uses : actions/checkout@v3
8993 with :
9094 path : ${{ env.CURRENT_BRANCH }}
9195 persist-credentials : false
9296 - name : Check out target branch (${{ matrix.branch }})
93- uses : actions/checkout@v2
97+ uses : actions/checkout@v3
9498 with :
9599 ref : ${{ matrix.branch }}
96100 path : ${{ matrix.branch }}
101+ - name : Set up Python 3.10
102+ uses : actions/setup-python@v4
103+ with :
104+ python-version : ' 3.10'
97105 - name : Install dependencies
98106 run : |
99107 sudo apt update -y && sudo apt install gettext -y
@@ -110,7 +118,9 @@ jobs:
110118 run : |
111119 powrap --modified -C ${{ matrix.branch }}
112120 - name : Commit and push changes
113- if : github.repository == 'python/python-docs-pt-br'
121+ if : |
122+ github.repository == 'python/python-docs-pt-br' &&
123+ ! github.event_name == 'pull_request'
114124 run : |
115125 cd ${{ matrix.branch }}
116126 git config user.name github-actions
@@ -123,7 +133,7 @@ jobs:
123133 # Call the build workflow after updating
124134 name : call
125135 needs : [update]
126- uses : python/python-docs-pt-br/ .github/workflows/build.yml@3.10
136+ uses : ./ .github/workflows/build.yml
127137 with :
128138 was-called : yes
129139 secrets :
@@ -134,4 +144,4 @@ jobs:
134144 # Call the compendium workflow after updating
135145 name : call
136146 needs : [update]
137- uses : python/python-docs-pt-br/ .github/workflows/compendium.yml@3.10
147+ uses : ./ .github/workflows/compendium.yml
0 commit comments