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 ef704e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ 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 log -1 --format='%H')
echo "INFO: commit=$COMMIT_HASH"
curl --request POST --form token=$TRIGGER_TOKEN --form ref=$COMMIT_HASH https://gitlab.com/api/v4/projects/36844106/trigger/pipeline

0 comments on commit ef704e4

Please sign in to comment.