Skip to content

Infer some values for Github Release #29

@RichiCoder1

Description

@RichiCoder1

Having used this action a few times now, I think there's some possibility to make the action a bit less boilerplate-y.

Specifically, if the user specifies a urlTemplate that matches ^https:\/\/github\.com\/(?<repo>.*\/.*)\/releases\/download\/, infer the following:

fromGithubReleases: true
repo: <repo from regex>
version: latest

So that this:

      - uses: engineerd/configurator@v0.0.8
        with:
          name: "kind"
          fromGitHubReleases: "true"
          repo: "kubernetes-sigs/kind"
          urlTemplate: "https://github.com/kubernetes-sigs/kind/releases/download/{{version}}/kind-linux-amd64"
          version: "latest"
          token: ${{ secrets.GITHUB_TOKEN }}

would become this:

      - uses: engineerd/configurator@v0.0.8
        with:
          name: "kind"
          urlTemplate: "https://github.com/kubernetes-sigs/kind/releases/download/{{version}}/kind-linux-amd64"
          token: ${{ secrets.GITHUB_TOKEN }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions