git: Event trigger on push

Viewed 101

I'm wondering if there's a way to detect when I commit and push code.

The idea came because I'm greedy and I want my GitHub to reflect my "code productivity" but we use gitlab at work and I wanted to write a little bash script that detects when I push and updates a phony private github repo on github.

I've looked online but couldn't find event driven workflows for git.
Where do I start ?

1 Answers

I've looked online but couldn't find event driven workflows for git.

You can use a GitLab event-driven workflow, with GitLab CI/CD pipeline.

For instance, IlyaSemenov/gitlab-ci-git-push will push your commits done on GitLab main to another repository of your choice.

Related