Skip to content

Commit

Permalink
Self code review
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Tingajkin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin committed Nov 1, 2020
1 parent 34c3301 commit 74d81c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository != 'networkservicemesh/cmd-template'
steps:
- name: Checkout integration-k8s-kind
- name: Checkout repository
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
repository: ${{ github.repository }}
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
- name: Find merged PR
uses: jwalton/gh-find-current-pr@v1
id: findPr
Expand All @@ -240,11 +236,15 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
- uses: benjlevesque/short-sha@v1.1
id: short-sha
with:
length: 8
- name: Find and Replace version
uses: jacobtomlinson/gha-find-replace@master
with:
find: "${{ github.event.repository.name }}:.*\n"
replace: "${{ github.event.repository.name }}:${GITHUB_SHA::8}"
replace: "${{ github.event.repository.name }}:${{ steps.short-sha.outputs.sha }}\n"
- name: Push update to the integration-k8s-kind
working-directory: networkservicemesh/integration-k8s-kind
run: |
Expand All @@ -265,4 +265,7 @@ jobs:
git config --global user.name "NSMBot"
git commit -s -F /tmp/commit-message
git checkout -b update/"${branchName}"
git push -f origin update/"${branchName}"
while [ git push -f origin update/"${branchName}" ]; do
git fetch origin update/"${branchName}"
git rebase origin/update/"${branchName}"
done
18 changes: 11 additions & 7 deletions .github/workflows/update-integration-k8s-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository != 'networkservicemesh/cmd-template'
steps:
- name: Checkout integration-k8s-kind
- name: Checkout repository
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
repository: ${{ github.repository }}
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
- name: Find merged PR
uses: jwalton/gh-find-current-pr@v1
id: findPr
Expand All @@ -42,11 +38,15 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
- uses: benjlevesque/short-sha@v1.1
id: short-sha
with:
length: 8
- name: Find and Replace version
uses: jacobtomlinson/gha-find-replace@master
with:
find: "${{ github.event.repository.name }}:.*\n"
replace: "${{ github.event.repository.name }}:${GITHUB_SHA::8}"
replace: "${{ github.event.repository.name }}:${{ steps.short-sha.outputs.sha }}\n"
- name: Push update to the integration-k8s-kind
working-directory: networkservicemesh/integration-k8s-kind
run: |
Expand All @@ -67,4 +67,8 @@ jobs:
git config --global user.name "NSMBot"
git commit -s -F /tmp/commit-message
git checkout -b update/"${branchName}"
git push -f origin update/"${branchName}"
while [ git push -f origin update/"${branchName}" ]; do
git fetch origin update/"${branchName}"
git rebase origin/update/"${branchName}"
done

0 comments on commit 74d81c4

Please sign in to comment.