Skip to content

Commit 04916a6

Browse files
authored
chore: Switch to git based diffing instead of API diffing (#14467)
<!-- 🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉 --> #### Summary Should help with #14464 hopefully. This changes our CI to use git based diffing instead of the GitHub API. Also changes the polling internal to 15s instead of 5s <!-- Use the following steps to ensure your PR is ready to be reviewed - [ ] Read the [contribution guidelines](../blob/main/CONTRIBUTING.md) 🧑‍🎓 - [ ] Run `make lint` to ensure the proposed changes follow the coding style 🚨 (install golangci-lint [here](https://golangci-lint.run/usage/install/#local-installation)) - [ ] Run `make test` to ensure the proposed changes pass the tests 🧪 - [ ] If changing a source plugin run `make gen` to ensure docs are up to date 📝 - [ ] Ensure the status checks below are successful ✅ --->
1 parent 25b4a0f commit 04916a6

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/wait_for_required_workflows.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Wait for all required workflows to pass
33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
6-
6+
77
on:
88
pull_request:
99
branches:
@@ -15,13 +15,15 @@ jobs:
1515
name: wait-for-required-workflows
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
1921
- name: Get changed files
2022
id: changed-files
21-
uses: Ana06/get-changed-files@v2.2.0
23+
uses: tj-actions/changed-files@v39
2224
- uses: actions/github-script@v6
2325
env:
24-
FILES: ${{ steps.changed-files.outputs.all }}
26+
FILES: ${{ steps.changed-files.outputs.all_changed_files }}
2527
with:
2628
script: |
2729
const script = require('./scripts/workflows/wait_for_required_workflows.js')

scripts/workflows/wait_for_required_workflows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = async ({github, context}) => {
7878
}
7979
pendingActions = actions.filter(action => !runs.some(({name}) => name === action))
8080
console.log(`Waiting for ${pendingActions.join(", ")}`)
81-
await new Promise(r => setTimeout(r, 5000));
81+
await new Promise(r => setTimeout(r, 15000));
8282
now = new Date().getTime()
8383
}
8484
throw new Error(`Timed out waiting for ${pendingActions.join(', ')}`)

0 commit comments

Comments
 (0)