Skip to content

Commit

Permalink
Add workflows for triggering image building process
Browse files Browse the repository at this point in the history
  • Loading branch information
GJFR committed Feb 19, 2024
1 parent 4076b6c commit 164fa44
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/trigger-dev-build-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Trigger GitLab dev build job
on:
push:
branches:
- dev
env:
GITLAB_PIPELINE_TRIGGER_TOKEN: ${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }}
jobs:
trigger_build_job:
runs-on: ubuntu-latest
steps:
- name: send triggering request
run: |
curl -X POST \
--fail \
-F token=$GITLAB_PIPELINE_TRIGGER_TOKEN \
-F "ref=main" \
https://gitlab.kuleuven.be/api/v4/projects/17581/trigger/pipeline
38 changes: 38 additions & 0 deletions .github/workflows/trigger-release-build-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Trigger GitLab release build job
on:
push:
branches:
- main
env:
GITLAB_PIPELINE_TRIGGER_TOKEN: ${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }}
jobs:

trigger_build_job:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- name: send triggering request
run: |
curl -X POST \
--fail \
-F token=$GITLAB_PIPELINE_TRIGGER_TOKEN \
-F "ref=main" \
-F "variables[RELEASE_VERSION]=${{github.ref_name}}" \
https://gitlab.kuleuven.be/api/v4/projects/17581/trigger/pipeline
package_release:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false

0 comments on commit 164fa44

Please sign in to comment.