Skip to content

Commit

Permalink
Trigger Update DB from selected branch
Browse files Browse the repository at this point in the history
instead of always hardcoding `main`!

NOTE: use the commit hash b/c in GitLab branch names are different!

Related: COMPOSER-2227
  • Loading branch information
atodorov committed Jun 11, 2024
1 parent ee3fa6b commit 80c5fa1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
env:
TRIGGER_TOKEN: ${{ secrets.TRIGGER_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}

- name: Trigger CI
run: |
curl --request POST --form token=$TRIGGER_TOKEN --form ref=main https://gitlab.com/api/v4/projects/36844106/trigger/pipeline
COMMIT_HASH=$(git show HEAD | grep "^commit " | cut -f2 -d" ")
curl --request POST --form token=$TRIGGER_TOKEN --form ref=$COMMIT_HASH https://gitlab.com/api/v4/projects/36844106/trigger/pipeline

0 comments on commit 80c5fa1

Please sign in to comment.