Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 59c4e7d

Browse files
authored
Merge pull request #24 from aiming/jkasuya-aim-patch-1
branch_name の説明を追記した
2 parents cd29953 + 77bcf61 commit 59c4e7d

2 files changed

Lines changed: 27 additions & 13 deletions

File tree

.github/workflows/test.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
- name: Test default checkout
2323
uses: ./
2424
with:
25-
checkout_dir: step1
25+
checkout_dir: step.default
2626

2727
- name: Directory exists
2828
run: |
29-
if [ ! -d ./step1 ]; then
29+
if [ ! -d ./step.default ]; then
3030
echo '::error:: Should be able to be checked out'
3131
exit 1
3232
fi
@@ -35,11 +35,11 @@ jobs:
3535
uses: ./
3636
with:
3737
branch_name: main
38-
checkout_dir: step2
38+
checkout_dir: step.branch_name
3939

4040
- name: Directory exists
4141
run: |
42-
if [ ! -d ./step2 ]; then
42+
if [ ! -d ./step.branch_name ]; then
4343
echo '::error:: Should be able to be checked out'
4444
exit 1
4545
fi
@@ -48,24 +48,38 @@ jobs:
4848
uses: ./
4949
with:
5050
branch_name: refs/heads/main
51-
checkout_dir: step3
51+
checkout_dir: step.long_branch_name
5252

5353
- name: Directory exists
5454
run: |
55-
if [ ! -d ./step3 ]; then
55+
if [ ! -d ./step.long_branch_name ]; then
5656
echo '::error:: Should be able to be checked out'
5757
exit 1
5858
fi
5959
60+
- name: Test checkout with branch_name as origin/main
61+
continue-on-error: true
62+
uses: ./
63+
with:
64+
branch_name: origin/main
65+
checkout_dir: step.branch_name_include_origin
66+
67+
- name: Directory does not exists
68+
run: |
69+
if [ -d ./step.branch_name_include_origin ]; then
70+
echo '::error:: Should fail checking out'
71+
exit 1
72+
fi
73+
6074
- name: Test checkout and no depth option
6175
uses: ./
6276
with:
6377
depth: ''
64-
checkout_dir: step4
78+
checkout_dir: step.no_depth_option
6579

6680
- name: Directory exists
6781
run: |
68-
if [ ! -d ./step4 ]; then
82+
if [ ! -d ./step.no_depth_option ]; then
6983
echo '::error:: Should be able to be checked out'
7084
exit 1
7185
fi
@@ -76,11 +90,11 @@ jobs:
7690
ACT: 1
7791
with:
7892
depth: ''
79-
checkout_dir: step5
93+
checkout_dir: step.act_presented
8094

8195
- name: Directory does not exist
8296
run: |
83-
if [ -d ./step5 ]; then
97+
if [ -d ./step.act_presented ]; then
8498
echo '::error:: Should not be able to be checked out, when ACT environment is exists'
8599
exit 1
86100
fi
@@ -89,14 +103,14 @@ jobs:
89103
uses: ./
90104
with:
91105
depth: ''
92-
checkout_dir: step6
106+
checkout_dir: step.authoer
93107

94108
- name: Have user.name and user.email on .git/config?
95109
run: |
96110
set -xe
97111
pwd
98112
ls -al
99-
pushd step6
113+
pushd step.authoer
100114
if [ "${GITHUB_ACTOR}" != "$(git config --local --get user.name)" ]; then
101115
echo '::error:: "git config --local --get user.name" Should be equal' "$GITHUB_ACTOR"
102116
exit 1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://swet.dena.com/entry/2021/07/12/120000 を参照してください。
2424
# Default: ${{ github.actor }}
2525
github_actor: ''
2626

27-
# cloneするブランチ名を指定します。通常は指定なしです
27+
# cloneするブランチ名を指定します。通常は指定なしです(※origin/develop ではなく develop を渡してください)
2828
branch_name: ''
2929

3030
# cloneするcommit shaを指定します。

0 commit comments

Comments
 (0)