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

Bump MrOctopus/download-asset-action from 1.0 to 1.1 in /workflow-templates #396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workflow-templates/check-general-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Download latest editorconfig-checker release binary package
id: download
uses: MrOctopus/download-asset-action@1.0
uses: MrOctopus/download-asset-action@1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Starting from version 2.0.0, the editorconfig-checker/action-editorconfig-checker action now acts as an installer for the editorconfig-checker tool (similar to how the actions/setup-* actions work). This means it can serve as a replacement for the MrOctopus/download-asset-action action in this specific application of installing editorconfig-checker.

Copy link
Contributor

Choose a reason for hiding this comment

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

Installation of editorconfig-checker via go install is now well supported.

This approach would allow us to manage the version of the tool dependency via the Go modules system and Dependabot, as suggested for shfmt (#396 (comment)) and gon (#360 (comment)), as well as other Go-based tool dependencies (which could even include Task).

with:
repository: editorconfig-checker/editorconfig-checker
excludes: prerelease, draft
Expand Down
4 changes: 2 additions & 2 deletions workflow-templates/check-shell-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:

- name: Download latest ShellCheck release binary package
id: download
uses: MrOctopus/download-asset-action@1.0
uses: MrOctopus/download-asset-action@1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

An alternative approach to installation would be APT, which is an officially supported installation method:

https://github.com/koalaman/shellcheck#installing

However, the version in the Ubuntu 22.04 package repository is outdated:

https://launchpad.net/ubuntu/jammy/+source/shellcheck

So I think that is an unsuitable method.


The Snap package is another officially supported installation method, and the package is up to date:

https://snapcraft.io/shellcheck

So I think this would be the best alternative to the current release binary download installation method.

with:
repository: koalaman/shellcheck
excludes: prerelease, draft
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

- name: Download shfmt
id: download
uses: MrOctopus/download-asset-action@1.0
uses: MrOctopus/download-asset-action@1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

An alternative approach to installation would be using go install (which was not available for use at the time the template was written). This is an officially supported installation method for the tool:

https://github.com/mvdan/sh#shfmt

My personal preference would be to use that installation approach in combination with a dummy "tools" Go package, which would allow controlled bumps of the tool dependency via automated Dependabot PRs. However, we could also just use go install mvdan.cc/sh/v3/cmd/shfmt@latest to get simple uncontrolled installation as is done with the current approach.

with:
repository: mvdan/sh
excludes: prerelease, draft
Expand Down
Loading