Code Monkey home page Code Monkey logo

.github's Introduction

.github's People

Contributors

d-uzlov avatar denis-tingaikin avatar edwarnicke avatar glazychev-art avatar lioneljouin avatar nikitaskrynnik avatar wazsone avatar xzfc avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

.github's Issues

Vulnerabilities in workflows

Some workflows have vulnerabilities:

  1. We use hardcoded NSM_BOT_GITHUB_TOKEN in some of workflows
  2. We use hardcoded organization name in some of workflows

Automate updating versing of 'go'

Motivation

Updating version of 'go' is a very monotonous and most importantly time-consuming task since we need to update all our repositories (https://github.com/networkservicemesh?q=&type=all&language=go&sort= we have 54 repos)

Solution

Create a workflow that will update all repos automatically.

Implementation (DRAFT)

  1. The user with admin rights creates a branch in .github repoupdate/go_${version}
  2. NSMBot creates PR into .github repo where update version of go (simply replaces string with version https://github.com/networkservicemesh/.github/blob/main/.github/workflows/build-and-test.yaml to new version from the branch name)
  3. NSMBot merges the branch if everyting is OK
  4. Right after merge the branch, workflow triggers and starts update other go repos. (We could re-use our expirience with releaing and use workflow_run event https://github.com/networkservicemesh/sdk/blob/main/.github/workflows/release.yaml#L3-L8)
  5. The workflow uses matrix and fetch org job https://github.com/networkservicemesh/cmd-template/blob/main/.github/workflows/update-cmd-repositories.yaml#L9-L20 to get the list of repos
  6. Checkout repo from the list https://github.com/networkservicemesh/cmd-template/blob/main/.github/workflows/update-cmd-repositories.yaml#L30-L35
  7. replace strings with go version in go mod and in ./workflow folder
  8. install new version of go
  9. run go mod tidy
  10. if Dockerfile is exsist then we should update version of the docker image https://github.com/networkservicemesh/cmd-nsc/blob/main/Dockerfile#L1
  11. commit changes as NSMBot and open PR (just push a brach update/go_$version into target repo)
  12. NSMBot automaticcaly will create a PR and if ci will pass then the update will be merged (this step is already done)

Fix warnings in common github actions

Check generated files
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
golangci-lint / golangci-lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
exclude-replace / excludereplace
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
checkgomod / checkgomod
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
restrict-nsm-deps / restrict-nsm-deps
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
yamllint / yamllint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
shellcheck / shellcheck
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build-and-test / build-and-test (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build-and-test / build-and-test (macos-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Remove or replace deprecated golang linters

We have deprecated golang linters across all repos.

Info

level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref."
level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.