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
@@ -293,25 +292,38 @@ jobs:
293292
294293 - name : Send to Pixel Eagle
295294 run : |
295+ curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
296+ chmod 755 pixeleagle-cli
297+
296298 cd .github/start-mobile-example
297299 for screenshot in $(find . -type f -maxdepth 1 -name "*.png");
298300 do
299301 file=${screenshot:2}
300302 name="${{ matrix.os }}-${{ matrix.device }}-${{ matrix.os_version }}-$file"
301- echo $name
302- 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 }}
303+ mv "$file" "$name"
303304 done
304305
306+ ../../pixeleagle-cli upload-screenshots ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} *.png
307+ env :
308+ PIXEL_EAGLE_TOKEN : ${{ secrets.PIXELEAGLE }}
309+
305310 mobile-check-result-pixel-eagle :
306311 runs-on : ubuntu-latest
307312 timeout-minutes : 30
308313 needs : [take-screenshots, create-pixel-eagle-run]
309314 if : always()
310315 steps :
316+ - name : Download Pixel Eagle CLI
317+ run : |
318+ curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
319+ chmod 755 pixeleagle-cli
320+
311321 - name : Trigger screenshots comparison
312322 run : |
313- 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
323+ ./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
314324 cat pixeleagle-mobile.json
325+ env :
326+ PIXEL_EAGLE_TOKEN : ${{ secrets.PIXELEAGLE }}
315327
316328 - name : Upload Pixel Eagle status
317329 uses : actions/upload-artifact@v5
0 commit comments