Skip to content

Commit

Permalink
Update gitlab trigger due to security
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Pukenis <[email protected]>
  • Loading branch information
LukasPukenis committed Oct 24, 2024
1 parent 1f65566 commit 372757e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/gitlab.yml
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

0 comments on commit 372757e

Please sign in to comment.