generated from open-resources/copy_file_to_another_repo_action
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.26 KB
/
main.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
name: Push File
on: push
jobs:
copy-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Mark test file
run: |-
echo $GITHUB_SHA > test02.md
echo $GITHUB_SHA > test03.md
- name: Ignore unchanged file
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'test01.md'
destination_repo: 'dmnemec/release-test'
user_email: '[email protected]'
user_name: 'dmnemec'
- name: Push changed file
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'test02.md'
destination_repo: 'dmnemec/release-test'
user_email: '[email protected]'
user_name: 'dmnemec'
- name: Check custom commit message
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'test03.md'
destination_repo: 'dmnemec/release-test'
user_email: '[email protected]'
user_name: 'dmnemec'
commit_message: 'A custom message.'