Skip to content

Commit fa9155f

Browse files
authored
fix: deployment workflows (#755)
1 parent e60328c commit fa9155f

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.github/workflows/check-code.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,3 +361,28 @@ jobs:
361361
-w /workspace \
362362
paritytech/ci-unified:bullseye-1.74.0 \
363363
bash -c "bash -x scripts/run_benches_for_runtime.sh ${{ matrix.runtime }} dev"
364+
365+
trigger-gitlab:
366+
name: Trigger GitLab CI
367+
runs-on: ubuntu-latest
368+
env:
369+
TARGET_WORKFLOW_FILE: trigger-gitlab-pipeline.yml # Change this in case of file renamings
370+
371+
needs:
372+
- cargo-doc
373+
- cargo-test
374+
- try-runtime
375+
# This is only triggered on pushes, which means pushes on `master`, `develop` or of tags.
376+
- test-runtime-benchmarks
377+
378+
steps:
379+
- name: Trigger "GitLab trigger" workflow
380+
uses: actions/github-script@v7
381+
with:
382+
script: |
383+
github.rest.actions.createWorkflowDispatch({
384+
owner: context.repo.owner,
385+
repo: context.repo.repo,
386+
workflow_id: '${{ env.TARGET_WORKFLOW_FILE }}',
387+
ref: '${{ github.ref }}',
388+
})

.github/workflows/trigger-gitlab-pipeline.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,11 @@ name: Trigger GitLab Deploy Pipeline
22

33
on:
44
workflow_dispatch:
5-
workflow_run:
6-
workflows: ["Check codebase"]
7-
branches:
8-
- develop
9-
- master
10-
- 'refs/tags/[0-9]+.[0-9]+.[0-9]+*'
11-
types:
12-
- completed
135

146
jobs:
157
trigger-gitlab:
168
name: Trigger GitLab CI
179
runs-on: ubuntu-latest
18-
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
1910

2011
steps:
2112
- name: Checkout repository

0 commit comments

Comments
 (0)