Add another file under resources
#58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sync-subtree-to-another-repo | |
#run-name: Sync a subtree of this repo to another repo | |
# run manually | |
#on: workflow_dispatch | |
on: | |
push: | |
paths: | |
- 'resources/**' | |
branches: | |
- 'github-workflows-commit-to-another-repo' | |
tags: | |
- '1.*' | |
jobs: | |
helloworld: | |
runs-on: ubuntu-22.04 | |
env: | |
FOO: bar | |
steps: | |
- run: git version | |
- run: pwd | |
- run: env | sort | |
- run: >- | |
echo "Github Ref: ${{ github.ref }}" | |
- run: uname -a | |
- run: whoami | |
- name: Dump github context | |
run: | | |
echo '${{ toJson(github) }}' | jq . | |
- run: >- | |
echo "NOW=$(date)" >> $GITHUB_ENV | |
- run: echo "NOW=$NOW" | |
- uses: actions/checkout@v3 | |
with: | |
repository: '${{ github.repository }}' | |
path: 'hello-octapus' | |
submodules: true | |
token: ${{ secrets.REPO_READER_ACCESS_TOKEN }} | |
- uses: actions/checkout@v3 | |
with: | |
repository: '${{ github.repository_owner }}/hello-octapus-public' | |
path: 'hello-octapus-public' | |
submodules: true | |
token: ${{ secrets.REPO_READER_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 | |
working-directory: '${{ github.workspace }}/hello-octapus-public' |