Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed Jun 1, 2024
1 parent 777f264 commit 54c8c55
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 70 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
run: |
images=$(grep -ro * -e "ghcr\.io\/networkservicemesh\/.*")
for image in $images; do
if [[ "$image" != *"${{ env.tag }}"* ]]; then
exit 0
fi
if [[ "$image" != *"${{ env.tag }}"* ]]; then
exit 0
fi
done
exit 1
Expand Down
134 changes: 67 additions & 67 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Tag env
run: |
branch=${{ github.event.workflow_run.head_branch }}
echo $branch
echo "tag=${branch#release/}" >> $GITHUB_OUTPUT
id: tag-step

Expand All @@ -40,6 +39,7 @@ jobs:
- name: Check images are pullable
run: |
images=$(grep -roh 'apps' -e "ghcr\.io\/networkservicemesh\/.*:v.*..*..*")
echo "Hello"
echo $images
for image in $images; do
docker pull $image
Expand All @@ -59,69 +59,69 @@ jobs:
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}

update-dependent-repositories:
strategy:
matrix:
repository:
- integration-tests
name: Update ${{ matrix.repository }}
needs: [get-tag, create-release]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
with:
go-version: 1.20.5
- name: Setup envs
run: |
echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
echo GO111MODULE=on >> $GITHUB_ENV
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
repository: ${{ github.repository }}
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
ref: release/${{ needs.get-tag.outputs.tag }}
- name: Install gotestmd
run: |
go install github.com/networkservicemesh/gotestmd@main
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- uses: actions/setup-go@v1
with:
go-version: 1.20.5
- name: Checkout networkservicemesh/${{ matrix.repository }}
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
repository: networkservicemesh/${{ matrix.repository }}
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
- name: Update ${{ matrix.repository }} locally
working-directory: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
run: |
go generate ./...
go mod tidy
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with:
length: 8
- name: Push update to the ${{ matrix.repository }}
working-directory: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
run: |
sed -r -i 's/sha = "[a-z0-9]*"/sha = "tags\/${{ needs.get-tag.outputs.tag }}"/g' extensions/base/suite.gen.go
git add -- .
echo Starting to update repositotry ${{ matrix.repository }}
if ! [ -n "$(git diff --cached --exit-code)" ]; then
echo ${{ matrix.repository }} is up to date
exit 0;
fi
git config --global user.email "nsmbot@networkservicmesh.io"
git config --global user.name "NSMBot"
echo "Update to ${{ github.repository }}@${{ needs.get-tag.outputs.tag }}" >> /tmp/commit-message
git commit -s -F /tmp/commit-message
git checkout -b release/${{ needs.get-tag.outputs.tag }}
git push -f origin release/${{ needs.get-tag.outputs.tag }}
# update-dependent-repositories:
# strategy:
# matrix:
# repository:
# - integration-tests
# name: Update ${{ matrix.repository }}
# needs: [get-tag, create-release]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/setup-go@v1
# with:
# go-version: 1.20.5
# - name: Setup envs
# run: |
# echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
# echo GO111MODULE=on >> $GITHUB_ENV
# echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
# - name: Checkout ${{ github.repository }}
# uses: actions/checkout@v2
# with:
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# repository: ${{ github.repository }}
# token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
# ref: release/${{ needs.get-tag.outputs.tag }}
# - name: Install gotestmd
# run: |
# go install github.com/networkservicemesh/gotestmd@main
# working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - name: Install goimports
# run: |
# go install golang.org/x/tools/cmd/goimports@latest
# working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - uses: actions/setup-go@v1
# with:
# go-version: 1.20.5
# - name: Checkout networkservicemesh/${{ matrix.repository }}
# uses: actions/checkout@v2
# with:
# path: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
# repository: networkservicemesh/${{ matrix.repository }}
# token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
# - name: Update ${{ matrix.repository }} locally
# working-directory: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
# run: |
# go generate ./...
# go mod tidy
# - uses: benjlevesque/short-sha@v1.2
# id: short-sha
# with:
# length: 8
# - name: Push update to the ${{ matrix.repository }}
# working-directory: ${{ github.workspace }}/src/github.com/networkservicemesh/${{ matrix.repository }}
# run: |
# sed -r -i 's/sha = "[a-z0-9]*"/sha = "tags\/${{ needs.get-tag.outputs.tag }}"/g' extensions/base/suite.gen.go
# git add -- .
# echo Starting to update repositotry ${{ matrix.repository }}
# if ! [ -n "$(git diff --cached --exit-code)" ]; then
# echo ${{ matrix.repository }} is up to date
# exit 0;
# fi
# git config --global user.email "nsmbot@networkservicmesh.io"
# git config --global user.name "NSMBot"
# echo "Update to ${{ github.repository }}@${{ needs.get-tag.outputs.tag }}" >> /tmp/commit-message
# git commit -s -F /tmp/commit-message
# git checkout -b release/${{ needs.get-tag.outputs.tag }}
# git push -f origin release/${{ needs.get-tag.outputs.tag }}

0 comments on commit 54c8c55

Please sign in to comment.