Skip to content

Commit

Permalink
Sync files with networkservicemesh/cmd-template
Browse files Browse the repository at this point in the history
This PR syncs files with https://github.com/networkservicemesh/cmd-template

Revision: https://github.com/networkservicemesh/cmd-template/commits/e4e00d0e5ec2ea33004ad70844473add39398cee

commit e4e00d0e5ec2ea33004ad70844473add39398cee
Author: Denis Tingaikin <[email protected]>
Date:   Tue Apr 13 23:41:32 2021 +0700

    fix issue with missing updates for some cmd repos (#69)

    Signed-off-by: Denis Tingaikin <[email protected]>

Signed-off-by: NSMBot <[email protected]>
  • Loading branch information
NSMBot committed Apr 13, 2021
1 parent 2343605 commit 9289edc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
34 changes: 5 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
echo "Please use errors.Errorf (or errors.New or errors.Wrap or errors.Wrapf) as appropriate rather than fmt.Errorf"
exit 1
fi
restrictNSMDeps:
name: Restrict dependencies on github.com/networkservicemesh/*
runs-on: ubuntu-latest
Expand All @@ -82,6 +83,7 @@ jobs:
exit 1
fi;
done
checkgomod:
name: Check go.mod and go.sum
runs-on: ubuntu-latest
Expand All @@ -94,6 +96,7 @@ jobs:
- name: Check for changes
run: |
git diff --name-only --exit-code || ( echo "Run go mod tidy" && false )
gogenerate:
name: Check generated files
runs-on: ubuntu-latest
Expand All @@ -106,6 +109,7 @@ jobs:
- name: Check for changes
run: |
git diff --name-only --exit-code || ( echo "Rerun go generate ./... locally and resubmit" && false )
excludereplace:
name: Exclude Replace in go.mod
runs-on: ubuntu-latest
Expand All @@ -116,6 +120,7 @@ jobs:
run: |
grep ^replace go.mod || exit 0
exit 1
docker:
name: Docker Build & Test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -144,32 +149,3 @@ jobs:
pr-${{ steps.findPr.outputs.pr }}
commit-${{ github.sha }}
latest
pushImage:
name: Push docker image
runs-on: ubuntu-latest
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USER: ${{ secrets.DOCKER_LOGIN }}
ORG: networkservicemeshci
CGO_ENABLED: 0
NAME: ${{ github.event.repository.name }}
needs:
- 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
- uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Build ${NAME}:${GITHUB_SHA::8} image
run: docker build . -t "${ORG}/${NAME}:${GITHUB_SHA::8}" --target runtime
- name: Build ${NAME}:latest image
run: docker build . -t "${ORG}/${NAME}" --target runtime
- name: Push ${NAME} images
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push "${ORG}/${NAME}:${GITHUB_SHA::8}"
docker image rm "${ORG}/${NAME}:${GITHUB_SHA::8}"
docker push "${ORG}/${NAME}"
docker image rm "${ORG}/${NAME}"
9 changes: 7 additions & 2 deletions .github/workflows/docker-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
branches:
- master
workflow_run:
types:
- completed
workflows:
- 'automerge'
jobs:
pushImage:
name: Push docker image
Expand All @@ -14,12 +19,12 @@ jobs:
ORG: networkservicemeshci
CGO_ENABLED: 0
NAME: ${{ github.event.repository.name }}
if: github.repository != 'networkservicemesh/cmd-template'
if: ${{ github.repository != 'networkservicemesh/cmd-template' && (github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' || github.ref == 'refs/heads/master') }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.15
go-version: 1.16
- name: Build ${NAME}:${GITHUB_SHA::8} image
run: docker build . -t "${ORG}/${NAME}:${GITHUB_SHA::8}" --target runtime
- name: Build ${NAME}:latest image
Expand Down

0 comments on commit 9289edc

Please sign in to comment.