@samitouri / QOS-React / commits / 1f0701c11e

Write Diff Train import branch to this repo (#28869)

For fbsource we've historically used a separate repo for imports due to internal limitations in Diff Train. Those have been lifted so we can now commit this branch here and then we can import from this repo (and get rid of the other repo)

Jon Janzen committed Apr 18, 2024 at 12:08 UTC 1f0701c11e424347cb333e88154c59e1c7016b30
1 file changed +37 -1
.github/workflows/commit_artifacts.yml
+37 -1
@@ -210,7 +210,7 @@ jobs:
210 commit_user_email: ${{ github.actor }}@users.noreply.github.com
211 create_branch: true
212
213 - commit_fbsource_artifacts:
213 + commit_fbsource_artifacts_external_repo:
214 needs: download_artifacts
215 runs-on: ubuntu-latest
216 if: ${{ (github.ref == 'refs/heads/main' && needs.download_artifacts.outputs.fbsource_branch_count == '0') || github.ref == 'refs/heads/meta-fbsource' }}
@@ -245,3 +245,39 @@ jobs:
245 DiffTrain build for commit https://github.com/facebook/react/commit/${{ github.sha }}.
246 commit_user_name: ${{ github.actor }}
247 commit_user_email: ${{ github.actor }}@users.noreply.github.com
248 +
249 + commit_fbsource_artifacts:
250 + needs: download_artifacts
251 + if: ${{ (github.ref == 'refs/heads/main' && needs.download_artifacts.outputs.fbsource_branch_count == '0') || github.ref == 'refs/heads/meta-fbsource' }}
252 + runs-on: ubuntu-latest
253 + steps:
254 + - uses: actions/checkout@v4
255 + with:
256 + ref: builds/facebook-fbsource
257 + - name: Ensure clean directory
258 + run: rm -rf compiled
259 + - uses: actions/download-artifact@v3
260 + with:
261 + name: compiled-rn
262 + path: compiled-rn/
263 + - run: git status -u
264 + - name: Check if only the REVISION file has changed
265 + id: check_should_commit
266 + run: |
267 + if git status --porcelain | grep -qv '/REVISION$'; then
268 + echo "should_commit=true" >> "$GITHUB_OUTPUT"
269 + else
270 + echo "should_commit=false" >> "$GITHUB_OUTPUT"
271 + fi
272 + - name: Commit changes to branch
273 + if: steps.check_should_commit.outputs.should_commit == 'true'
274 + uses: stefanzweifel/git-auto-commit-action@v4
275 + with:
276 + commit_message: |
277 + ${{ github.event.head_commit.message }}
278 +
279 + DiffTrain build for commit https://github.com/facebook/react/commit/${{ github.sha }}.
280 + branch: builds/facebook-fbsource
281 + commit_user_name: ${{ github.actor }}
282 + commit_user_email: ${{ github.actor }}@users.noreply.github.com
283 + create_branch: true