-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: trigger gitlab as soon as possible
Previously, we gated the GitLab tests on the unit tests. However, these now take ~10 minutes, which is just annoying for engineers. This commit changes the trigger to fire immediately after the PR is updated. This should save our engineers 10 minutes on every push. Regarding higher infra costs: Engineers are more expensive. :P Signed-off-by: Ondřej Budai <ondrej@budai.cz>
- Loading branch information
1 parent
0e4a9e5
commit a58224a
Showing
3 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Trigger GitLab | ||
|
||
# NOTE(mhayden): Restricting branches prevents jobs from being doubled since | ||
# a push to a pull request triggers two events. | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
gitlab-ci-helper: | ||
name: "Gitlab CI trigger helper" | ||
runs-on: ubuntu-latest | ||
env: | ||
SKIP_CI: ${{ (github.event.pull_request.draft == true || contains(github.event.pull_request.labels.*.name, 'WIP')) && !contains(github.event.pull_request.labels.*.name, 'WIP+test') }} | ||
steps: | ||
- name: Write PR status | ||
run: echo "$SKIP_CI" > SKIP_CI.txt | ||
- name: Upload status | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PR_STATUS | ||
path: SKIP_CI.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters