-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gitlab trigger due to security
Signed-off-by: Lukas Pukenis <[email protected]>
- Loading branch information
1 parent
1f65566
commit 372757e
Showing
1 changed file
with
16 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
name: Trigger GitLab pipeline | ||
name: GitLab CI Pipeline | ||
on: | ||
pull_request_target: | ||
branches: [dev, main] | ||
types: [labeled] | ||
push: | ||
branches: [dev, main] | ||
tags: | ||
- v* | ||
# Avoid running on 0 since a lot of other workflows on github start at that | ||
# time and this can cause delays or even dropping of jobs: | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
- cron: 26 23,10 * * * | ||
permissions: {} | ||
|
||
jobs: | ||
trigger-gitlab-pipeline: | ||
runs-on: [self-hosted, gitlab] | ||
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'gitlab')) }} | ||
steps: | ||
- uses: NordSecurity/trigger-gitlab-pipeline@940714dbb5c77428fb13ecdb3a94cf929adfb65e # v2.0.0 | ||
with: | ||
ci-api-v4-url: ${{ secrets.CI_API_V4_URL }} | ||
access-token: ${{ secrets.GITLAB_API_TOKEN }} | ||
trigger-token: ${{ secrets.TOKEN }} | ||
project-id: ${{ secrets.PROJECT_ID }} | ||
cancel-outdated-pipelines: ${{ github.ref_name != 'main' && github.ref_name != 'dev' }} | ||
triggered-ref: ${{ secrets.REF }} | ||
uses: NordSecurity/trigger-gitlab-pipeline/.github/workflows/trigger-gitlab-pipeline.yml@272b0b859016b5c0ff2c3b7d70799270b0a047fb | ||
secrets: | ||
ci-api-v4-url: ${{ secrets.CI_API_V4_URL }} | ||
access-token: ${{ secrets.GITLAB_API_TOKEN }} | ||
trigger-token: ${{ secrets.TOKEN }} | ||
project-id: ${{ secrets.PROJECT_ID }} | ||
with: | ||
schedule: ${{ github.event_name == 'schedule' }} | ||
cancel-outdated-pipelines: ${{ github.ref_name != 'main' }} | ||
triggered-ref: main | ||
|