File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1- name : Commit Artifacts for Facebook WWW and fbsource
1+ name : Commit Artifacts for Meta WWW and fbsource
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, meta-www, meta-fbsource ]
66
77jobs :
88 download_artifacts :
99 runs-on : ubuntu-latest
10+ outputs :
11+ www_branch_count : ${{ steps.check_branches.outputs.www_branch_count }}
12+ fbsource_branch_count : ${{ steps.check_branches.outputs.fbsource_branch_count }}
1013 steps :
14+ - uses : actions/checkout@v3
15+ - name : " Check branches"
16+ id : check_branches
17+ run : |
18+ echo "www_branch_count=$(git ls-remote --heads origin "refs/heads/meta-www" | wc -l)" >> "$GITHUB_OUTPUT"
19+ echo "fbsource_branch_count=$(git ls-remote --heads origin "refs/heads/meta-fbsource" | wc -l)" >> "$GITHUB_OUTPUT"
1120 - name : Download and unzip artifacts
1221 uses : actions/github-script@v6
1322 env :
@@ -168,6 +177,7 @@ jobs:
168177
169178 commit_www_artifacts :
170179 needs : download_artifacts
180+ if : ${{ (github.ref == 'refs/heads/main' && needs.download_artifacts.outputs.www_branch_count == '0') || github.ref == 'refs/heads/meta-www' }}
171181 runs-on : ubuntu-latest
172182 steps :
173183 - uses : actions/checkout@v3
@@ -204,6 +214,7 @@ jobs:
204214 commit_fbsource_artifacts :
205215 needs : download_artifacts
206216 runs-on : ubuntu-latest
217+ if : ${{ (github.ref == 'refs/heads/main' && needs.download_artifacts.outputs.fbsource_branch_count == '0') || github.ref == 'refs/heads/meta-fbsource' }}
207218 steps :
208219 - uses : actions/checkout@v3
209220 with :
You can’t perform that action at this time.
0 commit comments