|
54 | 54 | runs-on: linux-x86-n2-16-buildkit |
55 | 55 | container: google/cloud-sdk:524.0.0 |
56 | 56 | if: > |
| 57 | + github.event_name == 'release' || |
57 | 58 | github.event_name == 'schedule' || |
58 | 59 | github.event_name == 'pull_request' || |
59 | 60 | github.event_name == 'workflow_dispatch' && ( |
|
86 | 87 | # This ensures that every job clones the exact same commit as "setup" job |
87 | 88 | ref: ${{ inputs.maxtext_sha }} |
88 | 89 |
|
89 | | - - name: Checkout post-training dependencies |
90 | | - if: steps.check.outputs.should_run == 'true' && inputs.image_name == 'maxtext_post_training_nightly' |
91 | | - run: | |
92 | | - git clone https://github.com/google/tunix.git ./tunix |
93 | | - git clone https://github.com/vllm-project/vllm.git ./vllm |
94 | | - git clone https://github.com/vllm-project/tpu-inference.git ./tpu-inference |
95 | | -
|
96 | 90 | - name: Mark git repositories as safe |
97 | | - run: git config --global --add safe.directory '*' |
| 91 | + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} |
98 | 92 | if: steps.check.outputs.should_run == 'true' |
99 | 93 |
|
100 | 94 | - name: Configure Docker |
@@ -148,16 +142,6 @@ jobs: |
148 | 142 | # Add MaxText tag |
149 | 143 | maxtext_hash=$(git rev-parse --short HEAD) |
150 | 144 | gcloud container images add-tag "$SOURCE_IMAGE:${{ github.run_id }}" "$SOURCE_IMAGE:maxtext_${maxtext_hash}_${clean_date}" --quiet |
151 | | -
|
152 | | - # Add post-training dependencies tags |
153 | | - if [ "${{ inputs.workflow }}" == "post-training" ]; then |
154 | | - for dir in tunix vllm tpu-inference; do |
155 | | - if [ -d "./$dir" ]; then |
156 | | - dir_hash=$(git -C "$dir" rev-parse --short HEAD) |
157 | | - gcloud container images add-tag "$SOURCE_IMAGE:${{ github.run_id }}" "$SOURCE_IMAGE:${dir}_${dir_hash}_${clean_date}" --quiet |
158 | | - fi |
159 | | - done |
160 | | - fi |
161 | 145 | fi |
162 | 146 | env: |
163 | 147 | INPUTS_IMAGE_NAME: ${{ inputs.image_name }} |
|
0 commit comments