Closed suricloud closed 3 months ago
Yes I can
Thanks for the update. I tried with github classic token, but didn''t worked in cf workers. Can you please explain more in details how to do it?
I created github token as showed here, creates a cf worker and pasted the code and made the changes as required. But no succes, i see this error in console;
2worker.js:233 Error: No response! at facade_sw_fetch (worker.js:176:15) at facade_invokeChain (worker.js:25:12) at Object.next (worker.js:22:16) at jsonError (worker.js:231:34) at facade_invokeChain (worker.js:25:12) at Object.next (worker.js:22:16) at scheduled (worker.js:213:26) at facade_invokeChain (worker.js:25:12) at facade_invoke (worker.js:28:12) at worker.js:181:43 jsonError @ worker.js:233
Try all permission and delete all content of old deleloyed on Cloudflare Workers page
Remember paste you see lastest line if has )} ,delete it
I just pasted this? Created new cloudflare worker, deleted the existed demo code and then past this with my github token, github username en repos.
addEventListener('scheduled', event => { event.waitUntil(handleScheduledEvent()); });
async function handleScheduledEvent() {
const GITHUB_TOKEN = 'YOUR_GITHUB_TOKEN_HERE';
try {
const dispatchResponse = await fetch('https://api.github.com/repos/YOUR_USER_NAME/YOUR_REPO_NAME/actions/workflows/main.yml/dispatches', {
method: 'POST',
headers: {
'Authorization': Bearer ${GITHUB_TOKEN}
,
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0',
},
body: JSON.stringify({
ref: 'main'
}),
});
if (!dispatchResponse.ok) throw new Error('Failed to dispatch workflow');
} catch (error) { console.error('Error handling scheduled event:', error); } }
Change your toke, your account and repository name. Example :
https://api.github.com/repos/luxysiv/Cloudflare-Gateway-Pihole/actions/workflows/main.yml/dispatches
Change your toke, your account and repository name. Example :
https://api.github.com/repos/luxysiv/Cloudflare-Gateway-Pihole/actions/workflows/main.yml/dispatches
I have done, still getting same errors in console?
Try, I was test. It's work
I created github token as showed here, creates a cf worker and pasted the code and made the changes as required. But no succes, i see this error in console;
2worker.js:233 Error: No response! at facade_sw_fetch (worker.js:176:15) at facade_invokeChain (worker.js:25:12) at Object.next (worker.js:22:16) at jsonError (worker.js:231:34) at facade_invokeChain (worker.js:25:12) at Object.next (worker.js:22:16) at scheduled (worker.js:213:26) at facade_invokeChain (worker.js:25:12) at facade_invoke (worker.js:28:12) at worker.js:181:43 jsonError @ worker.js:233
Don't care About log error
can you sent the full screenshot of cf workers you added? mine seems to be different and my errors are different en in red color. Something is not good my side.Want to know where and what to correct.
can you sent the full screenshot of cf workers you added? mine seems to be different and my errors are different en in red color. Something is not good my side.Want to know where and what to correct.
The same, see my console log. Don't worry about it.Code is ok
should cron trigger to be set to 1 minute? This will update then update github and filters evry minute?
1 day, Github Action limited
ok,thanks. Will see how this work out :)
is this ok
0 /23 | At 0 minutes past the hour, every 23 hours
It's easy to configure.
ok :)
Code now won’t fail if Cloudflare’s server is normal
Hi,
Will you also update this cloudlare gateway package a with this new update to run github actions with cf workers ?