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

Add yamlfmt setup action #191

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Jan 4, 2023

This commit adds a new action called "setup-yamlfmt" that installs yamlfmt into the actions environment.

Signed-off-by: Adolfo García Veytia (Puerco) puerco@chainguard.dev

@puerco puerco requested a review from luhring January 4, 2023 23:14
This commit adds a new action called "setup-yamlfmt" that installs
yamlffmt into the actions environment.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
@puerco
Copy link
Contributor Author

puerco commented Jan 4, 2023

Mmh I think the linter is wrong here? 🤔

Comment on lines +23 to +36
# - if version is "tip", install from tip of main.
# - if version is "latest", look up latest release.
# - otherwise, install the specified version.
case ${{ inputs.version }} in
tip)
echo "Installing yamlfmt using go install"
go install github.com/google/yamlfmt@main
;;
latest)
tag=$(curl -L -s -u "username:${{ github.token }}" https://api.github.com/repos/google/yamlfmt/releases/latest | jq -r '.tag_name')
;;
*)
tag="${{ inputs.version }}"
esac
Copy link

Choose a reason for hiding this comment

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

I think the go install <repo>@<git-ref> syntax handles main and latest automatically, in addition to tagged versions. Would it make sense to let the go install command handle the version parsing here?

@luhring
Copy link

luhring commented Jan 5, 2023

Mmh I think the linter is wrong here? 🤔

Yeah, I think you're right. It looks like it's treating this YAML file as a regular GitHub Actions workflow, not as an action. 🤔

@cpanato
Copy link
Member

cpanato commented Jan 10, 2023

Mmh I think the linter is wrong here? 🤔

lets ignore this one

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

rename the action to use .yml and not .yaml

setup-yamlfmt/action.yml

@cpanato
Copy link
Member

cpanato commented Jun 30, 2023

@puerco do still want this?

@cpanato
Copy link
Member

cpanato commented Nov 22, 2023

@puerco gently ping

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.

None yet

3 participants