Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate update for github-action-config.json #1208

Closed
sayboras opened this issue Jul 5, 2020 · 8 comments · Fixed by #1460
Closed

Automate update for github-action-config.json #1208

sayboras opened this issue Jul 5, 2020 · 8 comments · Fixed by #1460
Labels
blocked Need's direct action from maintainer good first issue Good for newcomers help wanted Issue that needs help from a contributor

Comments

@sayboras
Copy link
Member

sayboras commented Jul 5, 2020

Need to investigate on how to automate this

Originally posted by @sayboras in #1207 (comment)

Currently we have Make target make assets/github-action-config.json to update github-action-config.json, will be better to have it run as part of release automatically.

Updated: Just found the below steps in https://github.com/golangci/golangci-lint/blob/master/docs/src/docs/contributing/workflow.mdx

After making a release you need to update (TODO: automate partially):

  1. GitHub action config by running:
make assets/github-action-config.json
  1. Update netlify state hash
make update_netlify_state
  1. Contributors list
make update_contributors_list # may take 15 min

`

@SVilgelm
Copy link
Member

So, actually we need to run these steps after a release. It means, that when the release workflow is completed, next one should run those steps, create a commit an push to the master branch

@sayboras
Copy link
Member Author

sayboras commented Jul 12, 2020

So, actually we need to run these steps after a release. It means, that when the release workflow is completed, next one should run those steps, create a commit an push to the master branch

Yes, you are right. Currently, I think we just wait till the issue with gorelease for brew gets resolved first, then the above steps can be done in the same job (after gorelease)

@sayboras sayboras added the blocked Need's direct action from maintainer label Jul 12, 2020
sayboras added a commit to sayboras/golangci-lint that referenced this issue Oct 24, 2020
This commit is to update metadata for golangci-lint-action after 1.32.0
release.

NOTE: Once golangci#1208 is resolved, this step will be automated

Relates golangci#1208

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit that referenced this issue Oct 25, 2020
This commit is to update metadata for golangci-lint-action after 1.32.0
release.

NOTE: Once #1208 is resolved, this step will be automated

Relates #1208

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit to sayboras/golangci-lint that referenced this issue Oct 31, 2020
This commit is to update metadata for golangci-lint-action after 1.32.1
release for couples of bug fixes.

NOTE: Once golangci#1208 is resolved, this step will be automated

Relates golangci#1208

Signed-off-by: Tam Mach sayboras@yahoo.com
Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit that referenced this issue Nov 1, 2020
This commit is to update metadata for golangci-lint-action after 1.32.1
release for couples of bug fixes.

NOTE: Once #1208 is resolved, this step will be automated

Relates #1208

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit to sayboras/golangci-lint that referenced this issue Nov 3, 2020
This commit is to update metadata for golangci-lint-action after 1.32.2
release for couples of bug fixes.

NOTE: Once golangci#1208 is resolved, this step will be automated

Relates golangci#1208

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit that referenced this issue Nov 3, 2020
This commit is to update metadata for golangci-lint-action after 1.32.2
release for couples of bug fixes.

NOTE: Once #1208 is resolved, this step will be automated

Relates #1208

Signed-off-by: Tam Mach <sayboras@yahoo.com>
This was referenced Nov 25, 2020
@denis-tingaikin
Copy link
Member

@sayboras I feel to commit changes automatically we need a user account/bot.

Question: Have golangci a user for automatization?

@ernado
Copy link
Member

ernado commented Dec 28, 2020

AFAIK changes can be commited via default github actions user, but I can be wrong

@sayboras
Copy link
Member Author

@denis-tingajkin @ernado I also think github action user can do so, similar to goreleaser is able to create the release. Might need to test it out. I did have dependabot commit directly into master in my repo before.

@SVilgelm
Copy link
Member

@sayboras it's easy, except on part. The master branch is protected, we need to create the Pull Request from an action.

  1. the release job is completed
  2. git checkout -b update-docs
  3. make update_contributors_list, make assets/github-action-config.json, make update_netlify_state
  4. git add -u
  5. git push origin update-docs
  6. magic script to create a pull request using GitHub API

@SVilgelm
Copy link
Member

I know that the default GITHUB_TOKEN does not allow creation of the pull requests, but we can use secrets.GOLANGCI_LINT_TOKEN

@SVilgelm
Copy link
Member

or if the secrets.GOLANGCI_LINT_TOKEN has admin permissions, then we can push to master branch directly

@ldez ldez closed this as completed in #1460 Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Need's direct action from maintainer good first issue Good for newcomers help wanted Issue that needs help from a contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants