Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is it possible to use github webhooks whitelist IP in this way? #708

Open
qooke opened this issue Oct 30, 2024 · 1 comment
Open

Is it possible to use github webhooks whitelist IP in this way? #708

qooke opened this issue Oct 30, 2024 · 1 comment

Comments

@qooke
Copy link

qooke commented Oct 30, 2024

- id: xxxx
  execute-command: "xxx"
  command-working-directory: "xxxxxxxx"
  response-message: Executing deploy script
  trigger-rule:
    and:
    - match:
        type: ip-whitelist
        ip-range: readFile "github_webhooks_ip_list.txt"
    - match:
        type: payload-hmac-sha1
        secret: xxxxxxxx
        parameter:
          source: header
          name: X-Hub-Signature
    - match:
        type: value
        value: refs/heads/xxxxx
        parameter:
          source: payload
          name: ref

github_webhooks_ip_list.txt

192.30.252.0/22
185.199.108.0/22
140.82.112.0/20
143.55.64.0/20
2a0a:a440::/29
2606:50c0::/32     
@moorereason
Copy link
Collaborator

That's not currently possible. We would need to define a readFile template function. We currently only support a getenv function (see docs).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants