Skip to content

Commit

Permalink
Update common CI files to latest version from networkservicemesh/cmd-…
Browse files Browse the repository at this point in the history
…template@master networkservicemesh/cmd-template#39

networkservicemesh/cmd-template PR link: networkservicemesh/cmd-template#39

networkservicemesh/cmd-template commit message:
commit fb38e9392368e3b49266cc896326ccc8a56dacc0
Author: Denis Tingaikin <49399980+denis-tingajkin@users.noreply.github.com>
Date:   Tue Nov 10 18:45:27 2020 +0700

    replace master to latest (#39)

    Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
  • Loading branch information
NSMBot committed Nov 10, 2020
1 parent 9143a50 commit a3be965
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ jobs:
CGO_ENABLED: 0
NAME: ${{ github.event.repository.name }}
needs:
- automerge
- build
- docker
if: github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request' && github.repository != 'networkservicemesh/cmd-template'
steps:
- uses: actions/checkout@v2
Expand All @@ -189,8 +190,7 @@ jobs:
name: automerge
runs-on: ubuntu-latest
needs:
- build
- docker
- update-integration-k8s-kind
if: github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request'
steps:
- name: Check out the code
Expand All @@ -209,7 +209,7 @@ jobs:

update-integration-k8s-kind:
needs:
- automerge
- pushImage
name: Update integration-k8s-kind
runs-on: ubuntu-latest
if: github.repository != 'networkservicemesh/cmd-template' && github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request'
Expand All @@ -223,7 +223,7 @@ jobs:
- name: Create commit message
working-directory: ${{ github.repository }}
run: |
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" >> /tmp/commit-message
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" > /tmp/commit-message
echo "" >> /tmp/commit-message
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}" >> /tmp/commit-message
echo "" >> /tmp/commit-message
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
fi
diff=$(git diff --name-only)
branchName="${{ github.event.repository.name }}"
if [ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 1 ]; then
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then
sdkPattern="github.com\/networkservicemesh\/sdk "
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod)
branchName="${sdkVersion:${#sdkPattern}}"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docker-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
with:
go-version: 1.15
- name: Build ${NAME} image
run: docker build . -t "${ORG}/${NAME}:${GITHUB_SHA::8}" --target runtime
run: |
docker build . -t "${ORG}/${NAME}:${GITHUB_SHA::8}" --target runtime
docker build . -t "${ORG}/${NAME}:latest" --target runtime
- name: Push ${NAME} image
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/update-integration-k8s-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Create commit message
working-directory: ${{ github.repository }}
run: |
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" >> /tmp/commit-message
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" > /tmp/commit-message
echo "" >> /tmp/commit-message
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}" >> /tmp/commit-message
echo "" >> /tmp/commit-message
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
fi
diff=$(git diff --name-only)
branchName="${{ github.event.repository.name }}"
if [ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 1 ]; then
if [[ $(grep "go.mod" <<< "${diff}") && $(grep "" -c <<< "${diff}") == 2 ]]; then
sdkPattern="github.com\/networkservicemesh\/sdk "
sdkVersion=$(grep --regexp "${sdkPattern}" go.mod)
branchName="${sdkVersion:${#sdkPattern}}"
Expand All @@ -65,7 +65,6 @@ jobs:
echo Branch update/"${branchName}" is already deleted
}
fi;
fi;
git config --global user.email "nsmbot@networkservicmesh.io"
git config --global user.name "NSMBot"
git commit -s -F /tmp/commit-message
Expand Down

0 comments on commit a3be965

Please sign in to comment.