0

I’m attempting to make a cURL patch request via a GitHub action that executes when I make a push. The cURL call works perfectly when I execute it in Windows shell, but does nothing when I include it in a yaml file in my workflow. To be more specific, the GitHub Action actually succeeds, just the patch request clearly doesn’t go through. I’m directly entering my token and other info so I know the problem isn’t with secrets or something like that. Help appreciated!

on: 
  push: 
   
jobs: 
  updates_databricks_repos: 
    runs-on: ubuntu-latest 
    steps: 
      - name: databricks curl call 
        run: | 
          curl -n -X PATCH "https://adb-WORKSPACEHERE.azuredatabricks.net/api/2.0/repos/REPONUMHERE" \ 
            -H "Authorization: Bearer TOKENHERE" -d '{"branch": "Development"}' 
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
Nick_89
  • 117
  • 2
  • 11
  • what error do you get? – Alex Ott May 15 '22 at 12:16
  • There’s no error. It runs as if everything is working perfectly. – Nick_89 May 15 '22 at 21:48
  • 1
    Add debug output like -v to curl, etc. Btw, does your workspace have ip access lists enabled? – Alex Ott May 16 '22 at 05:36
  • Thanks, that was a good suggestion. Initially the output says it's connected to the host successfully, but then the host returns a URL and when I go to the URL manually in my browser I get the following message, "Configured privacy settings disallow access for workspace over your current network. Please contact your administrator for more information." It sounds like Databricks isn't letting me connect from GitHub's servers and I need to try to get GitHub on an access control list. – Nick_89 May 16 '22 at 12:01
  • I wonder if the Databricks Repos API would allow off-network access even though I can't connect via curl – Nick_89 May 16 '22 at 12:05
  • 1
    yes, you need to add Github network into IP Access List... – Alex Ott May 16 '22 at 12:15

0 Answers0