nomad icon indicating copy to clipboard operation
nomad copied to clipboard

ci: replace hosted `semver` with an action

Open madhead opened this issue 3 years ago • 2 comments

I've noticed, that you are using a curl to download a semver tool from https://raw.githubusercontent.com to work with semantic versions.

I propose to use my reusable GitHub Action to accomplish the same task. Using the reusable action has, from my point of view, some benefits, like being more native and natural and less surprising way of doing things in GitHub Actions Workflows.

If you would like to ensure it works the same way as before, I've tested it in my fork:

  • A successful run is here, take a look at the way it parsed the input. It's identical to the old way, isn't it?
  • The workflow I used for the check is here. I've commented some things out because they are optional for the purpose.
  • Guarding against invalid input also works.

Thank you!

madhead avatar Sep 21 '22 23:09 madhead

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Sep 21 '22 23:09 hashicorp-cla

Yes, sure. I understand. That's the reason I used a fixed tag, and not @latest or master. I saw you already used external actions in a few places:

  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/release.yml#L144
  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/ember-test-audit.yml#L20
  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/ember-test-audit.yml#L60
  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/ember-test-audit.yml#L68
  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/test-core.yaml#L40
  • https://github.com/hashicorp/nomad/blob/ff1a30fe8dd4a0da38ddd34915b0be2210d39614/.github/workflows/semgrep.yml#L18

So I might have a chance :relaxed:

madhead avatar Sep 22 '22 12:09 madhead

Oh, sorry for the delay here, I didn't see this PR before and this was actually a workflow that I created.

For now I'm thinking of keeping it as-is because I'm not 100% sure where we will go in terms of automating our release process, so keeping it more script-like makes it easier for us to port it to whatever direction we go.

But thank you very much for the work here @madhead. I will keep your action in mind as we cement our release process 🙂

lgfa29 avatar Nov 02 '22 23:11 lgfa29

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Mar 03 '23 02:03 github-actions[bot]