Skip to content

Add actionlint workflow#20

Merged
Czaki merged 9 commits into
napari:mainfrom
Czaki:actionlint
Jun 24, 2026
Merged

Add actionlint workflow#20
Czaki merged 9 commits into
napari:mainfrom
Czaki:actionlint

Conversation

@Czaki

@Czaki Czaki commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

To validate workflows on PRs.

- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -ignore SC2129

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this the proper way to do it? bash+curl?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

curl is printing downloaded file to stdout.

<(command) redirect command output to stdout of command

It is equivalent of: curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry I wasn't clear; I know that's what's happening :P I mean in terms of security, isn't this generally frowned upon? Are we ok with doing it in our workflow? Pointing to a main, unversioned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is working this way in the napari main repo.

Code also has no permissions.

It will be better to pin the version, but we need an automatic bumper then. And I do not have any idea how to do this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ok. Let's get this in like this then for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is fine with permissions = {} and no credentials persisted.

In the future, this may be a cleaner way to avoid bash execution. The risk as is is likely minimal.

        env:
          ACTIONLINT_VERSION: 1.7.12
        run: |
          curl --fail --silent --show-error --location \
            "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \
            | tar xz actionlint
          ./actionlint -color -ignore SC2129

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we will remember to bump the version

Comment thread .github/workflows/actionlint.yml Outdated
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -ignore SC2129

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is fine with permissions = {} and no credentials persisted.

In the future, this may be a cleaner way to avoid bash execution. The risk as is is likely minimal.

        env:
          ACTIONLINT_VERSION: 1.7.12
        run: |
          curl --fail --silent --show-error --location \
            "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \
            | tar xz actionlint
          ./actionlint -color -ignore SC2129

@Czaki Czaki merged commit 26f7f9d into napari:main Jun 24, 2026
4 checks passed
@Czaki Czaki deleted the actionlint branch June 24, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants