Repository navigation
[No QA] Trigger artifacts workflow when artifacts workflow files change #103149
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,12 @@ on: | |
| - patches/react-native/@react-native+*.patch | ||
| - Mobile-Expensify | ||
| - scripts/artifacts-utils/compute-patches-hash.sh | ||
| # Keep in sync with the "Check if artifact publishing workflows changed" step below. | ||
| - .github/workflows/publishReactNativeArtifacts.yml | ||
| - .github/workflows/publishReactNativeiOSArtifacts.yml | ||
| - .github/workflows/publishReactNativeAndroidArtifacts.yml | ||
| - .github/actions/composite/fetchReactNativePrebuild/action.yml | ||
| - scripts/artifacts-utils/ios/publish/** | ||
|
|
||
| jobs: | ||
| verifyPatches: | ||
|
|
@@ -117,6 +123,24 @@ jobs: | |
| echo "::notice::Detected changes in Standalone NewDot patches (${{ steps.getOldPatchesHash.outputs.STANDALONE_APP_HASH }} -> ${{ steps.getNewPatchesHash.outputs.STANDALONE_APP_HASH }})" | ||
| fi | ||
|
|
||
| - name: Check if artifact publishing workflows changed | ||
| if: ${{ github.event.after != '' }} | ||
| id: didWorkflowsChange | ||
| run: | | ||
| # Edits to the publishing workflows, the prebuild fetch action, or the iOS publish Gradle project | ||
| # change how artifacts are built without touching patches or the RN version. Keep in sync with `on.push.paths`. | ||
| if git diff --quiet '${{ github.event.before }}' '${{ github.event.after }}' -- \ | ||
| .github/workflows/publishReactNativeArtifacts.yml \ | ||
| .github/workflows/publishReactNativeiOSArtifacts.yml \ | ||
| .github/workflows/publishReactNativeAndroidArtifacts.yml \ | ||
| .github/actions/composite/fetchReactNativePrebuild/action.yml \ | ||
| scripts/artifacts-utils/ios/publish; then | ||
| echo "DID_WORKFLOWS_CHANGE=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "DID_WORKFLOWS_CHANGE=true" >> "$GITHUB_OUTPUT" | ||
| echo "::notice::Detected changes in the artifact publishing workflows" | ||
|
Comment on lines
+132
to
+141
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A
|
||
| fi | ||
|
|
||
| - name: Get artifact build targets | ||
| id: getArtifactBuildTargets | ||
| run: | | ||
|
|
@@ -139,8 +163,8 @@ jobs: | |
| fi | ||
|
|
||
| # push path: derive targets from what actually changed between github.event.before and github.event.after. | ||
| # Version change or standalone patch change forces a full rebuild of both hybrid and standalone. | ||
| if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_STANDALONE_APP_PATCHES_CHANGE }}' == 'true' ]]; then | ||
| # Version change, standalone patch change or a change to the publishing workflows forces a full rebuild of both hybrid and standalone. | ||
| if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_STANDALONE_APP_PATCHES_CHANGE }}' == 'true' || '${{ steps.didWorkflowsChange.outputs.DID_WORKFLOWS_CHANGE }}' == 'true' ]]; then | ||
| echo "BUILD_TARGETS=[\"true\", \"false\"]" >> "$GITHUB_OUTPUT" | ||
| elif [[ '${{ steps.didPatchesChange.outputs.DID_HYBRID_APP_PATCHES_CHANGE }}' == 'true' ]]; then | ||
| echo "BUILD_TARGETS=[\"true\"]" >> "$GITHUB_OUTPUT" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didWorkflowsChangeno longer matches its scopeThe step now also checks
fetchReactNativePrebuild/action.ymland the iOS publish Gradle project, but its name, id and output still say "workflows". Line 167 then logs "a change to the publishing workflows" when the trigger was the Gradle project.Rename to something like
didPublishPipelineChange/DID_PUBLISH_PIPELINE_CHANGE, and update the reference in the comment at line 44.