I have a public repo on Github that I would like to clone.
My goal is to setup a Github action that, once every month, it will clone this repo and upload any new changes from the public repo (hosted on Github) to my private repo.
This is my yml file so far:
name: Clone Repo Copy
on:
schedule:
- cron: "0 0 1 * *"
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: aws/aws-sdk-java-archetype
token: ${{ secrets.GITHUBPAT }}
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "generated"
git push
(my secrets.GITHUBPAT is my Github Personal Access Token which has access to everything for debugging purposes)
However, as expected, it didnt work, here are my logs: https://pastebin.com/tHLP0rn5 (Edited to remove username and repo) How could I make GitHub Actions clone a public repo and push it to my private repo?