1414 mobile_percy_project :
1515 required : false
1616 type : string
17- pixeleagle_project :
18- required : true
19- type : string
2017 branch :
2118 required : true
2219 type : string
3633 required : false
3734 type : string
3835 description : " Percy project to send results to"
39- pixeleagle_project :
40- required : true
41- type : string
42- default : " B25A040A-A980-4602-B90C-D480AB84076D"
43- description : " Pixel Eagle project to send results to"
4436 branch :
4537 required : true
4638 type : string
@@ -52,11 +44,18 @@ jobs:
5244 outputs :
5345 pixeleagle_run : ${{ steps.run.outputs.pixeleagle_run }}
5446 steps :
47+ - name : Download Pixel Eagle CLI
48+ run : |
49+ curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
50+ chmod 755 pixeleagle-cli
51+
5552 - name : Create Run
5653 id : run
5754 run : |
58- run=`curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"os":"mobile", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' --oauth2-bearer ${{ secrets.PIXELEAGLE }} | jq '.id '`
55+ run=`./pixeleagle-cli new-run --metadata '{"os":"mobile", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}'`
5956 echo "pixeleagle_run=$run" >> $GITHUB_OUTPUT
57+ env :
58+ PIXEL_EAGLE_TOKEN : ${{ secrets.PIXELEAGLE }}
6059
6160 build-for-iOS :
6261 runs-on : macos-latest
@@ -273,25 +272,38 @@ jobs:
273272
274273 - name : Send to Pixel Eagle
275274 run : |
275+ curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
276+ chmod 755 pixeleagle-cli
277+
276278 cd .github/start-mobile-example
277279 for screenshot in $(find . -type f -maxdepth 1 -name "*.png");
278280 do
279281 file=${screenshot:2}
280282 name="${{ matrix.os }}-${{ matrix.device }}-${{ matrix.os_version }}-$file"
281- echo $name
282- curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }}/screenshots -F "data=@./$file" -F "screenshot=$name" --oauth2-bearer ${{ secrets.PIXELEAGLE }}
283+ mv "$file" "$name"
283284 done
284285
286+ ../../pixeleagle-cli upload-screenshots ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} *.png
287+ env :
288+ PIXEL_EAGLE_TOKEN : ${{ secrets.PIXELEAGLE }}
289+
285290 mobile-check-result-pixel-eagle :
286291 runs-on : ubuntu-latest
287292 timeout-minutes : 30
288293 needs : [take-screenshots, create-pixel-eagle-run]
289294 if : always()
290295 steps :
296+ - name : Download Pixel Eagle CLI
297+ run : |
298+ curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
299+ chmod 755 pixeleagle-cli
300+
291301 - name : Trigger screenshots comparison
292302 run : |
293- curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/ ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }}/compare/auto -H 'Content-Type: application/json' -d '{"os":"<equal>", " branch": " main"}' --oauth2-bearer ${{ secrets.PIXELEAGLE }} | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-mobile.json
303+ ./pixeleagle-cli compare-run ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} --same os --filter branch: main --print-details | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-mobile.json
294304 cat pixeleagle-mobile.json
305+ env :
306+ PIXEL_EAGLE_TOKEN : ${{ secrets.PIXELEAGLE }}
295307
296308 - name : Upload Pixel Eagle status
297309 uses : actions/upload-artifact@v5
0 commit comments