Builds not triggering via github actions #1780
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceThis is a strange issue: I am able to build on Codemagic via API call or normal workflow based triggers with github. The problem is arising when I have enabled a github action which does some pre-processing & if all is right then make a curl call to codemagic. the response seems to be alright, but I can see no build in UI and/or there is 404 with getting that buildId as well. curl request in the github action curl -vvv -X POST -H "Content-Type: application/json" -H "x-auth-token: ${{ secrets.CODEMAGIC_API_KEY }}" -d '{"appId": "${{ secrets.CODEMAGIC_APPID }}","workflowId": "$WORKFLOW_ID","branch": "${{ env.BRANCH_NAME }}","environment": {"variables": {"triggeredBy": "githubactions"} } }' https://api.codemagic.io/builds Here is actions logs for relevant stage: branch name from previous stage: develop
Commit WAS made by GitHub Actions!!. Going to Trigger Codemagic Pipeline
Current branch: develop
Triggering Codemagic Pipeline with Workflow ID: ***
Note: Unnecessary use of -X or --request, POST is already inferred.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 216.239.36.21:443...
* Connected to api.codemagic.io (216.239.36.21) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.2 (IN), TLS header, Certificate Status (22):
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.2 (IN), TLS header, Finished (20):
{ [5 bytes data]
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4212 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.2 (OUT), TLS header, Finished (20):
} [5 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_[25](https://github.com/The-Speed-Turtle/thespeedturtleapp/actions/runs/5289692126/jobs/9572930951#step:4:26)6_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=api.codemagic.io
* start date: May 27 15:44:29 2023 GMT
* expire date: Aug 25 16:29:17 2023 GMT
* subjectAltName: host "api.codemagic.io" matched cert's "api.codemagic.io"
* issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1D4
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55decee37e00)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
> POST /builds HTTP/2
> Host: api.codemagic.io
> user-agent: curl/7.81.0
> accept: */*
> content-type: application/json
> x-auth-token: ***
> content-length: 151
>
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* We are completely uploaded and fine
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
} [5 bytes data]
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
< HTTP/2 200
< date: Fri, 16 Jun 2023 12:02:[26](https://github.com/The-Speed-Turtle/thespeedturtleapp/actions/runs/5289692126/jobs/9572930951#step:4:27) GMT
< content-type: application/json
< content-length: 38
< vary: Accept-Encoding
< vary: Cookie
< server: gunicorn
< x-ratelimit-limit: 5000
< x-ratelimit-remaining: 4984
< x-ratelimit-reset: 1686920547
< retry-after: 3600
< via: 1.1 google
<
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
100 189 100 38 100 151 147 584 --:--:-- --:--:-- --:--:-- 7[32](https://github.com/The-Speed-Turtle/thespeedturtleapp/actions/runs/5289692126/jobs/9572930951#step:4:33)
* Connection #0 to host api.codemagic.io left intact
{"buildId":"648c4f526c80402eba6b0f1d"} I have few other builds which seem to be triggered but there is nothing I can see on codemagic's side. Can someone look into this? Expected resultsThe build should trigger & I can see its status via api get call on buildId and on UI as well. Actual resultsGet call on buildId says 404! Build id (optional)648c4f526c80402eba6b0f1d |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @sshandilya-hub, I don't know what are you doing wrong but feel free to use this working GHA step.
|
Beta Was this translation helpful? Give feedback.
Hey @sshandilya-hub,
I don't know what are you doing wrong but feel free to use this working GHA step.