Can GitHub actions directly edit files and save data file?

i was host my discord.js on github action but the bot can’t edit file when i make a change from bot so is there any way to make my bot edit on file and save it .

Hi @salahsarkaf123,

Glad to see you in Github Community Forum!

Yes, Github actions can edit the files and save the data file.

  1. Firstly we need to checkout the source code( uses: actions/checkout@v2).
  2. Edit the file or via a script to do it automatically.
  3. Push the data file to repository.

Please check my answer in similar ticket for your reference.

You can push the data file back to repository, or push it as an artifact and download it from workflow.

Thanks