-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (54 loc) · 1.57 KB
/
learn-github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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'