Skip to content

Commit 120e6f4

Browse files
authored
Merge pull request #81 from NIDAP-Community/dev
Dev
2 parents ec380e7 + 5d786e5 commit 120e6f4

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/workflows/Append_File_On_Merged_to_Main.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
cd $current_wd
2525
2626
export MY_GIT_TOKEN=${{secrets.GITHUB_TOKEN}}
27-
export MY_GIT_USERNAME=${{secrets.GIT_USERNAME}}
28-
export MY_GIT_EMAIL=${{secrets.GIT_EMAIL}}
27+
export MY_GIT_USERNAME=${{ github.actor }}
28+
export MY_GIT_EMAIL=${{ github.event.pusher.email }}
2929
30-
git config --global user.name $MY_GIT_USERNAME
31-
git config --global user.email $MY_GIT_EMAIL
30+
git config --global user.name "$MY_GIT_USERNAME"
31+
git config --global user.email "$MY_GIT_EMAIL"
3232
git config --global url."https://api:[email protected]/".insteadOf "https://github.com/"
3333
git config --global url."https://ssh:[email protected]/".insteadOf "ssh://[email protected]/"
3434
git config --global url."https://git:[email protected]/".insteadOf "[email protected]:"
@@ -54,9 +54,10 @@ jobs:
5454
echo "Performing check now"
5555
export nothing_for_commit="$(grep -Po "nothing to commit" commit_log.log)"
5656
57-
if [ -z "$nothing_for_commit" ]; then
58-
echo "Commit check failed: $nothing_for_commit"
57+
if [ -n "${nothing_for_commit}" ]; then
58+
echo "Commit check failed with message: $nothing_for_commit"
5959
else
60+
echo "Pushing changes now."
6061
git push -f origin main
6162
fi
6263

.github/workflows/Check_On_Commit.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,19 @@ jobs:
3434
3535
bash $current_wd/.github/workflows/Check_on_Commit.sh "$current_wd"
3636
37+
3738
- name: Undo Push
3839
if: ${{ failure() }}
3940
run: |
4041
export current_wd="/__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}"
4142
echo "$current_wd"
4243
4344
export MY_GIT_TOKEN=${{secrets.GITHUB_TOKEN}}
44-
export MY_GIT_USERNAME=${{secrets.GIT_USERNAME}}
45-
export MY_GIT_EMAIL=${{secrets.GIT_EMAIL}}
45+
export MY_GIT_USERNAME=${{ github.actor }}
46+
export MY_GIT_EMAIL=${{ github.event.pusher.email }}
4647
47-
git config --global user.name $MY_GIT_USERNAME
48-
git config --global user.email $MY_GIT_EMAIL
48+
git config --global user.name "$MY_GIT_USERNAME"
49+
git config --global user.email "$MY_GIT_EMAIL"
4950
git config --global url."https://api:[email protected]/".insteadOf "https://github.com/"
5051
git config --global url."https://ssh:[email protected]/".insteadOf "ssh://[email protected]/"
5152
git config --global url."https://git:[email protected]/".insteadOf "[email protected]:"

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CCBR-GitHub-Playground
22
This training repo is for CCBR internal devs to familiarize with GitHub operation
33

4-
1. Modify Readme to Test
5-
Initial testing 2_1_23
4+
1. Modify the function codes to test commit action.
5+
2. Modify the test function codes to test commit action.
6+
3. Merge feature to dev, and create pull request from dev to release to test merge to release action.
7+
4. Create pull request release to main to test the check on merge to main action.
8+
5. Merge the release to main, this will trigger automatic file generation action.

0 commit comments

Comments
 (0)