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

feat: add check for newer versions #1562

Merged
merged 6 commits into from
Jan 15, 2023
Merged

feat: add check for newer versions #1562

merged 6 commits into from
Jan 15, 2023

Conversation

cplee
Copy link
Contributor

@cplee cplee commented Jan 14, 2023

Notify user when a newer version of act is available. Support disabling of version check by setting environment variable ACT_DISABLE_VERSION_CHECK=1

@cplee cplee requested a review from a team as a code owner January 14, 2023 18:50
@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 5 0 0.01s
✅ MAKEFILE checkmake 1 0 0.0s
✅ REPOSITORY gitleaks yes no 2.49s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY secretlint yes no 0.96s
✅ YAML prettier 1 0 0.4s
✅ YAML v8r 1 0 2.72s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Jan 14, 2023

Codecov Report

Merging #1562 (df07f9c) into master (4989f44) will increase coverage by 0.22%.
The diff coverage is 70.27%.

@@            Coverage Diff             @@
##           master    #1562      +/-   ##
==========================================
+ Coverage   61.22%   61.45%   +0.22%     
==========================================
  Files          46       46              
  Lines        7141     7157      +16     
==========================================
+ Hits         4372     4398      +26     
+ Misses       2462     2452      -10     
  Partials      307      307              
Impacted Files Coverage Δ
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_pull.go 33.33% <ø> (ø)
pkg/container/docker_run.go 13.58% <ø> (ø)
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/container/docker_images.go 27.02% <29.41%> (-4.13%) ⬇️
pkg/container/docker_auth.go 51.35% <56.25%> (+3.73%) ⬆️
pkg/runner/runner.go 86.45% <66.66%> (-2.05%) ⬇️
pkg/container/docker_build.go 59.49% <100.00%> (+0.51%) ⬆️
pkg/runner/command.go 94.16% <100.00%> (+1.73%) ⬆️
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
I have two questions:

  1. The logger does output only text. If act is started with '--json' it should respect that. Otherwise the log would not be parsable
  2. Why is the go-git patch by ZauberNerd removed?

@mergify mergify bot requested a review from a team January 14, 2023 20:18
@cplee
Copy link
Contributor Author

cplee commented Jan 14, 2023

Good catch @KnisterPeter . I updated to honor the --json for log format. Also reverted the change to go.mod (I was having issues with that patch and wasn't sure it was still needed?)

KnisterPeter
KnisterPeter previously approved these changes Jan 14, 2023
Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@KnisterPeter
Copy link
Member

We should check with @ZauberNerd.
What where the issues?

@cplee
Copy link
Contributor Author

cplee commented Jan 14, 2023

It was looking for tag v5.4.3 in his fork, which didn't exist

@ChristopherHX
Copy link
Contributor

Is it expected behavior to always show new version is available for source builds without an explicit version?
Maybe only check for updates if a version is provided to act?

@mergify
Copy link
Contributor

mergify bot commented Jan 15, 2023

@cplee this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Jan 15, 2023
@cplee
Copy link
Contributor Author

cplee commented Jan 15, 2023

@ChristopherHX - updated to keep the source version aligned with release version. This will avoid alerting on new versions if built from source...unless there is in fact a new version available. Fixed #1069 and #1555 too...

@mergify mergify bot removed the needs-work Extra attention is needed label Jan 15, 2023
@mergify mergify bot requested a review from a team January 15, 2023 06:45
@ZauberNerd
Copy link
Contributor

Oh, I rebased my PR go-git/go-git#485 last month, that's probably why it couldn't find the tag anymore.

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@mergify mergify bot merged commit 9390793 into master Jan 15, 2023
@mergify mergify bot deleted the check-for-update branch January 15, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants