generated from networkservicemesh/cmd-template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update common CI files to latest version from networkservicemesh/cmd-…
…template@master networkservicemesh/cmd-template#45 networkservicemesh/cmd-template PR link: networkservicemesh/cmd-template#45 networkservicemesh/cmd-template commit message: commit 4558c78de90a6a04846df663a46cf7a107f6f064 Author: Denis Tingaikin <[email protected]> Date: Fri Nov 20 14:15:04 2020 +0700 add missed working-directory (#45) Signed-off-by: Denis Tingajkin <[email protected]> Signed-off-by: NSMBot <[email protected]>
- Loading branch information
1 parent
c3959f0
commit bed83ce
Showing
3 changed files
with
45 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,6 +222,23 @@ jobs: | |
path: ${{ github.repository }} | ||
repository: ${{ github.repository }} | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- name: Create branch name | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
diff=$(git diff --name-only) | ||
BRANCH_NAME="${{ github.event.repository.name }}" | ||
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then | ||
sdkPattern="github.com\/networkservicemesh\/sdk " | ||
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod) | ||
BRANCH_NAME="${sdkVersion:${#sdkPattern}}" | ||
else | ||
{ | ||
git push origin --delete update/"${BRANCH_NAME}" | ||
} || { | ||
echo Branch update/"${BRANCH_NAME}" is already deleted | ||
} | ||
fi; | ||
echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV | ||
- name: Create commit message | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
|
@@ -239,7 +256,7 @@ jobs: | |
path: networkservicemesh/integration-k8s-kind | ||
repository: networkservicemesh/integration-k8s-kind | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- uses: benjlevesque/short-sha@v1.1 | ||
- uses: benjlevesque/short-sha@v1.2 | ||
id: short-sha | ||
with: | ||
length: 8 | ||
|
@@ -257,24 +274,11 @@ jobs: | |
echo Repository already up to date | ||
exit 0; | ||
fi | ||
diff=$(git diff --name-only) | ||
branchName="${{ github.event.repository.name }}" | ||
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then | ||
sdkPattern="github.com\/networkservicemesh\/sdk " | ||
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod) | ||
branchName="${sdkVersion:${#sdkPattern}}" | ||
else | ||
{ | ||
git push origin --delete update/"${branchName}" | ||
} || { | ||
echo Branch update/"${branchName}" is already deleted | ||
} | ||
fi; | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "NSMBot" | ||
git commit -s -F /tmp/commit-message | ||
git checkout -b update/"${branchName}" | ||
while [ $(git push origin update/"${branchName}") ]; do | ||
git fetch origin update/"${branchName}" | ||
git rebase origin/update/"${branchName}" | ||
git checkout -b update/"${BRANCH_NAME}" | ||
while [ $(git push origin update/"${BRANCH_NAME}") ]; do | ||
git fetch origin update/"${BRANCH_NAME}" | ||
git rebase origin/update/"${BRANCH_NAME}" | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
echo ${PULL_REQUEST_BODY} | ||
echo PULL_REQUEST_BODY=${PULL_REQUEST_BODY} >> $GITHUB_ENV | ||
- name: pull-request-action | ||
uses: vsoch/[email protected].6 | ||
uses: vsoch/[email protected].12 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
BRANCH_PREFIX: "update/" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,23 @@ jobs: | |
path: ${{ github.repository }} | ||
repository: ${{ github.repository }} | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- name: Create branch name | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
diff=$(git diff --name-only) | ||
BRANCH_NAME="${{ github.event.repository.name }}" | ||
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then | ||
sdkPattern="github.com\/networkservicemesh\/sdk " | ||
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod) | ||
BRANCH_NAME="${sdkVersion:${#sdkPattern}}" | ||
else | ||
{ | ||
git push origin --delete update/"${BRANCH_NAME}" | ||
} || { | ||
echo Branch update/"${BRANCH_NAME}" is already deleted | ||
} | ||
fi; | ||
echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV | ||
- name: Create commit message | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
|
@@ -34,7 +51,7 @@ jobs: | |
path: networkservicemesh/integration-k8s-kind | ||
repository: networkservicemesh/integration-k8s-kind | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- uses: benjlevesque/short-sha@v1.1 | ||
- uses: benjlevesque/short-sha@v1.2 | ||
id: short-sha | ||
with: | ||
length: 8 | ||
|
@@ -52,24 +69,11 @@ jobs: | |
echo Repository already up to date | ||
exit 0; | ||
fi | ||
diff=$(git diff --name-only) | ||
branchName="${{ github.event.repository.name }}" | ||
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then | ||
sdkPattern="github.com\/networkservicemesh\/sdk " | ||
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod) | ||
branchName="${sdkVersion:${#sdkPattern}}" | ||
else | ||
{ | ||
git push origin --delete update/"${branchName}" | ||
} || { | ||
echo Branch update/"${branchName}" is already deleted | ||
} | ||
fi; | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "NSMBot" | ||
git commit -s -F /tmp/commit-message | ||
git checkout -b update/"${branchName}" | ||
while [ $(git push origin update/"${branchName}") ]; do | ||
git fetch origin update/"${branchName}" | ||
git rebase origin/update/"${branchName}" | ||
git checkout -b update/"${BRANCH_NAME}" | ||
while [ $(git push origin update/"${BRANCH_NAME}") ]; do | ||
git fetch origin update/"${BRANCH_NAME}" | ||
git rebase origin/update/"${BRANCH_NAME}" | ||
done |