|
38 | 38 | required: false |
39 | 39 | type: string |
40 | 40 | default: 'pre-training' |
41 | | - version_name: |
42 | | - required: false |
43 | | - type: string |
44 | | - default: '' |
45 | 41 | include_test_assets: |
46 | 42 | required: false |
47 | 43 | type: boolean |
48 | 44 | default: false |
| 45 | + outputs: |
| 46 | + build_result: |
| 47 | + description: 'The result of build_and_push job.' |
| 48 | + value: ${{ jobs.build_and_push.result }} |
49 | 49 | secrets: |
50 | 50 | HF_TOKEN: |
51 | 51 | required: true |
|
65 | 65 | shell: bash |
66 | 66 | run: | |
67 | 67 | EVENT_NAME="${{ github.event_name }}" |
68 | | - TARGET_DEVICE="${{ github.event.inputs.target_device }}" |
| 68 | + # Default to 'all' if the input is null/empty |
| 69 | + TARGET_DEVICE="${{ github.event.inputs.target_device || 'all' }}" |
69 | 70 | INPUT_DEVICE="${{ inputs.device }}" |
70 | 71 |
|
71 | 72 | SHOULD_RUN="false" |
@@ -121,6 +122,7 @@ jobs: |
121 | 122 | uses: actions/download-artifact@v4 |
122 | 123 | with: |
123 | 124 | name: maxtext-wheel |
| 125 | + path: . |
124 | 126 |
|
125 | 127 | - name: Install uv and set Python version |
126 | 128 | uses: astral-sh/setup-uv@v7 |
@@ -166,26 +168,18 @@ jobs: |
166 | 168 | SOURCE_IMAGE="gcr.io/${{ vars.PROJECT_NAME }}/${INPUTS_IMAGE_NAME}" |
167 | 169 | TEMP_IMG="${SOURCE_IMAGE}:${{ github.run_id }}" |
168 | 170 |
|
169 | | - if [[ $INPUTS_VERSION_NAME ]]; then |
170 | | - echo "Tagging docker images corresponding to PyPI release..." |
171 | | - gcloud container images add-tag "${TEMP_IMG}" "${SOURCE_IMAGE}:${INPUTS_VERSION_NAME}" --quiet |
172 | | - else |
173 | | - echo "Tagging docker images corresponding to nightly release..." |
174 | | -
|
175 | | - # Add date tag |
176 | | - IMAGE_DATE="$(date +%Y-%m-%d)" |
177 | | - gcloud container images add-tag "${TEMP_IMG}" "$SOURCE_IMAGE:$IMAGE_DATE" --quiet |
| 171 | + # Add date tag |
| 172 | + IMAGE_DATE="$(date +%Y-%m-%d)" |
| 173 | + gcloud container images add-tag "${TEMP_IMG}" "$SOURCE_IMAGE:$IMAGE_DATE" --quiet |
178 | 174 |
|
179 | | - # Convert date to YYYYMMDD format |
180 | | - clean_date=$(echo "$IMAGE_DATE" | sed 's/[-:]//g' | cut -c1-8) |
| 175 | + # Convert date to YYYYMMDD format |
| 176 | + clean_date=$(echo "$IMAGE_DATE" | sed 's/[-:]//g' | cut -c1-8) |
181 | 177 |
|
182 | | - # Add MaxText tag |
183 | | - MAXTEXT_SHA=$(git rev-parse --short HEAD) |
184 | | - gcloud container images add-tag "${TEMP_IMG}" "${SOURCE_IMAGE}:maxtext_${MAXTEXT_SHA}_${clean_date}" --quiet |
185 | | - fi |
| 178 | + # Add MaxText tag |
| 179 | + MAXTEXT_SHA=$(git rev-parse --short HEAD) |
| 180 | + gcloud container images add-tag "${TEMP_IMG}" "${SOURCE_IMAGE}:maxtext_${MAXTEXT_SHA}_${clean_date}" --quiet |
186 | 181 | env: |
187 | 182 | INPUTS_IMAGE_NAME: ${{ inputs.image_name }} |
188 | | - INPUTS_VERSION_NAME: ${{ inputs.version_name }} |
189 | 183 |
|
190 | 184 | run_ci_tests: |
191 | 185 | name: Run Unit and Integration Tests |
|
0 commit comments