Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update the go version in a go.mod file.

License

NotificationsYou must be signed in to change notification settings

030/gomod-go-version-updater-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The rationale for this action is thatDependabot cannotupdate the go version that is defined in ago.mod file.

Usage

  1. To use this action, ensure that:Allow GitHub Actions to create and approve pull requests option has beenenabled in the action settings. In order to find this, attach:/settings/actions to the project URL, i.e.:https://github.com/<owner>/<project-name>/settings/actions.
  2. Once the setting has been enabled, create a~/.github/workflows/gomod-go-version-updater.yml file with the followingcontent:
    ---name:gomod-go-version-updater-action"on":schedule:    -cron:"42 6 * * *"permissions:contents:writepull-requests:writejobs:gomod-go-version-updater-action:runs-on:ubuntu-22.04steps:      -uses:030/gomod-go-version-updater-action@v0.1.6
  3. To ensure that an action is triggered for testing the Golang version update,add apull_request_review trigger. This will cause a specific WorkflowAction to run whenever someone submits a review for the pull request createdby thegomod-go-version-updater-action:
    "on":# required by gomod-go-version-updater to trigger this action once pr has# been reviewedpull_request_review:types:[submitted]
  4. Optional: if private go modules have to be downloaded:
    -uses:030/gomod-go-version-updater-action@v0.1.6with:github-token-for-downloading-private-go-modules:${{ secrets.GITHUB_TOKEN }}
  5. Optional: set the log level toDEBUG,WARNING,ERROR orCRITICAL(default: INFO):
    -uses:030/gomod-go-version-updater-action@v0.1.6with:gomod-go-version-updater-action-log-level:DEBUG
  6. Optional: add an extra label to the PR that will be created:
    -uses:030/gomod-go-version-updater-action@v0.1.6with:extra-pr-label:something

Development

If you want to develop on this action, you'll probably want to use a virtual environment. Feel free to arrange that in any way you want, but it could be as simple as running

python3-mvenv .venv

Don't forget to activate the virtual environment next:

source .venv/bin/activate

To install the dependencies to work on the project, you can usepip:

pip install'.[dev]'

To run the test suite run:

pytest

Test

Besides the test suite we run withpytest (see above) we run a more extensive set as part of quality control. See the run steps that are defined inthis GitHub Workflow for details.

About

Update the go version in a go.mod file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp