From 10924238956c3a06870ec3857930f83afced37de Mon Sep 17 00:00:00 2001 From: Michail Alexakis Date: Fri, 6 Sep 2024 16:04:32 +0300 Subject: [PATCH] Add another file under `resources` --- .github/workflows/learn-github-actions.yml | 17 +++++++++++++++-- resources/foobar/bye.txt | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 resources/foobar/bye.txt diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index b66a68c..c807ae1 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -7,7 +7,7 @@ name: sync-subtree-to-another-repo on: push: paths: - - 'resources/*' + - 'resources/**' branches: - 'github-workflows-commit-to-another-repo' tags: @@ -44,10 +44,23 @@ jobs: repository: '${{ github.repository_owner }}/hello-octapus-public' path: 'hello-octapus-public' submodules: true - token: ${{ secrets.REPO_READER_ACCESS_TOKEN }} + token: ${{ secrets.REPO_WRITER_ACCESS_TOKEN }} - run: ls -hal - run: ls -hal working-directory: '${{ github.workspace }}/hello-octapus' - run: ls -hal working-directory: '${{ github.workspace }}/hello-octapus-public' - run: rsync --version + - run: >- + rsync -avhi --delete --exclude '.gitkeep' ${{ github.workspace }}/hello-octapus/resources/ ${{ github.workspace }}/hello-octapus-public/resources/ + - run: |- + git status + git remote -v + git config user.name '${{ github.actor }}' + git config --global user.email '${{ github.actor }}@users.noreply.github.com' + working-directory: '${{ github.workspace }}/hello-octapus-public' + - run: |- + git add resources && git status + git commit -am 'Sync `resources/` folder from ${{ github.repository }}' + git push origin master + working-directory: '${{ github.workspace }}/hello-octapus-public' diff --git a/resources/foobar/bye.txt b/resources/foobar/bye.txt new file mode 100644 index 0000000..0917008 --- /dev/null +++ b/resources/foobar/bye.txt @@ -0,0 +1 @@ +Bye