How to trigger a github action when a github action push code

Viewed 144

I have build a github action, which config as

name: clock-in
on:
  workflow_dispatch:
  push:
    paths:
      - 'src/github/log/*'

jobs:
  clock-in:
    runs-on: ubuntu-latest
    steps:
      - ...
      - run: ./src/github/push.sh

and the push.sh

#! /bin/bash

remote_repo="https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" # remote repo address

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"

git add .
git commit -m "update clockin log "
git push

I wish that the github action can be triggered when 'src/github/log/*' file changed and pushed. however, when I make a push, it work normally, but when github action push the change, the new acion is not triggered. How I can make the action triggered when the push comes from github action

0 Answers
Related