How to run script from commit argument?

Trying to create Github Actions to run based on the commit message I’ve found:

if: !startsWith(github.event.head_commit.message, 'foo')

but how can I run a Node script that writes back to the repo/edits files without running any other script? What would my YML file look like?

example from Creating a JavaScript action:

on: [push]

    runs-on: ubuntu-latest
    name: A job to say hello
      # To use this repository's private action,
      # you must check out the repository
      - name: Checkout
        uses: actions/checkout@v2
      - name: Hello world action step
        uses: ./ # Uses an action in the root directory
        id: hello
          who-to-greet: 'Mona the Octocat'
      # Use the output from the `hello` step
      - name: Get the output time
        run: echo "The time was ${{ steps.hello.outputs.time }}"