Skip to content

Commit

Permalink
Merge pull request #184 from denis-tingaikin/fix-automerge-issues
Browse files Browse the repository at this point in the history
fix: remove outdated automerge job and update to latest sdk
  • Loading branch information
edwarnicke authored Apr 15, 2021
2 parents 233d855 + 5e67a5a commit 5408bf2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 82 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,79 +118,3 @@ jobs:
run: |
grep ^replace go.mod || exit 0
exit 1
automerge:
name: automerge
runs-on: ubuntu-latest
needs:
- build-and-test
if: github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request'
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Fetch master
run: |
git remote -v
git fetch --depth=1 origin master
- name: Only allow go.mod and go.sum changes
run: |
find . -type f ! -name 'go.mod' ! -name 'go.sum' -exec git diff --exit-code origin/master -- {} +
- name: Automerge nsmbot PR
uses: ridedott/merge-me-action@master
with:
GITHUB_LOGIN: nsmbot
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

update-dependent-repositories:
strategy:
matrix:
repository:
- sdk-sriov
name: Update ${{ matrix.repository }}
runs-on: ubuntu-latest
needs:
- automerge
if: github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request'
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
ref: master
fetch-depth: '0'
- name: Create commit message
working-directory: ${{ github.repository }}
run: |
echo "Update go.mod and go.sum 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
echo "${{ github.repository }} commit message:" >> /tmp/commit-message
git log -1 >> /tmp/commit-message
echo "Commit Message:"
cat /tmp/commit-message
- name: Checkout networkservicemesh/${{ matrix.repository }}
uses: actions/checkout@v2
with:
path: networkservicemesh/${{ matrix.repository }}
repository: networkservicemesh/${{ matrix.repository }}
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
- uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Update ${{ github.repository }} locally
working-directory: networkservicemesh/${{ matrix.repository }}
run: |
GOPROXY=direct go get -u github.com/${{ github.repository }}
go mod tidy
git diff
- name: Push update to the ${{ matrix.repository }}
working-directory: networkservicemesh/${{ matrix.repository }}
run: |
echo Starting to update repositotry ${{ matrix.repository }}
git config --global user.email "nsmbot@networkservicmesh.io"
git config --global user.name "NSMBot"
git add go.mod go.sum
git commit -s -F /tmp/commit-message
git checkout -b update/${{ github.repository }}
git push -f origin update/${{ github.repository }}
1 change: 1 addition & 0 deletions .github/workflows/update-dependent-repositories-gomod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- sdk-sriov
name: Update ${{ matrix.repository }}
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' || github.ref == 'refs/heads/master' }}
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.16
require (
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/networkservicemesh/api v0.0.0-20210403165646-b0b334ca6872
github.com/networkservicemesh/sdk v0.0.0-20210405062928-0d2dc281b97c
github.com/networkservicemesh/api v0.0.0-20210413152715-ad449d9a9192
github.com/networkservicemesh/sdk v0.0.0-20210414142658-66a1b9ac7425
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/vishvananda/netlink v1.1.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRftaE+eac=
github.com/networkservicemesh/api v0.0.0-20210403165646-b0b334ca6872 h1:Eg8ZgcJ0bukl10gHNVpF4lXDwg5JHig7E4RM2SdJ29k=
github.com/networkservicemesh/api v0.0.0-20210403165646-b0b334ca6872/go.mod h1:8daUQzI8sUvvNiPF6G3esmEvNQM/lJuAOobjdgtq2FM=
github.com/networkservicemesh/sdk v0.0.0-20210405062928-0d2dc281b97c h1:svZvtDPB44iv6QoCgVbVDN4gPyiyQGzHZ/gTr5TTTwQ=
github.com/networkservicemesh/sdk v0.0.0-20210405062928-0d2dc281b97c/go.mod h1:phKpePEEcubYjKnVzfdqoTQCmzdcToXRdLDA1o8nYDM=
github.com/networkservicemesh/api v0.0.0-20210413152715-ad449d9a9192 h1:xgkyncEQozAyge2edauHEKsutcCsgzcYZjgR0bH3y68=
github.com/networkservicemesh/api v0.0.0-20210413152715-ad449d9a9192/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.0.0-20210414142658-66a1b9ac7425 h1:/3sHWFRb3qwqZDP6BPfjmLQw7XX+VJqOZKSWo0OMhWo=
github.com/networkservicemesh/sdk v0.0.0-20210414142658-66a1b9ac7425/go.mod h1:A+nNIdNfNswppJlZBYQ5TUxKP7KMkKyjr94YzNY8I0o=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
Expand Down

0 comments on commit 5408bf2

Please sign in to comment.