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

update(doc): add version to avoid error when copy pasting examples #8

Merged
merged 9 commits into from
Oct 27, 2023
Merged

update(doc): add version to avoid error when copy pasting examples #8

merged 9 commits into from
Oct 27, 2023

Conversation

Ant0wan
Copy link
Contributor

@Ant0wan Ant0wan commented Oct 21, 2023

In order to enhance the clarity and accuracy of our GitHub Action workflow examples, I am proposing a modification to the format used in the uses directive.
This change aims to prevent potential errors and confusion for users.

Currently, the documentation and examples include lines like this:

- uses: opentofu/setup-opentofu

While this format is generic, it can sometimes lead to unexpected issues when inexperienced users are utilizing the action. To mitigate this, I recommend adopting a more explicit and precise format:

- uses: opentofu/setup-opentofu@v1

The addition of @ref (in this case, @v1) ensures that "fix".
To illustrate why this change is important, I've provided an example of a failure scenario that occurred the first time I used setup-opentofu in this GitHub Action run: Link to Failed Run. In this run, the absence of @ref led to a Github Action related issue, showcasing the potential pitfalls of the current format.
I understand that this change pertains to GitHub Action-specific user knowledge, but it can significantly benefit users, especially those who may not be familiar with the intricacies of action references.

Please review and consider this proposal, and let me know if you have any questions or suggestions.

Screenshots:
Screenshot from 2023-10-21 22-37-07

Copy link
Contributor

@kislerdm kislerdm left a comment

Choose a reason for hiding this comment

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

@Ant0wan Hi Antoine, thank you for your contribution!

(suggestion) WDYT about using major instead of full version in the examples? That way, users won't need to change their workflows to rely on up to date minor and patch releases.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Ant0wan
Copy link
Contributor Author

Ant0wan commented Oct 22, 2023

@kislerdm Yep, I think it is a better idea. However we need a v1 tag on the latest v1 version otherwise we will get this error:

Screenshot from 2023-10-22 12-46-25

Like in this example actions/checkout repo:

➜ git remote -v
origin	[email protected]:actions/checkout (fetch)
origin	[email protected]:actions/checkout (push)
➜ git tag -l
1.0.0
v1
v1.0.0
v1.1.0
v1.2.0
v2
v2-beta
v2.0.0
v2.1.0
v2.1.1
v2.2.0
v2.3.0
v2.3.1
v2.3.2
v2.3.3
v2.3.4
v2.3.5
v2.4.0
v2.4.1
v2.4.2
v2.5.0
v2.6.0
v2.7.0
v3
v3.0.0
v3.0.1
v3.0.2
v3.1.0
v3.2.0
v3.3.0
v3.4.0
v3.5.0
v3.5.1
v3.5.2
v3.5.3
v3.6.0
v4
v4.0.0
v4.1.0
v4.1.1

Ant0wan and others added 8 commits October 22, 2023 12:45
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
Co-authored-by: Dmitry Kisler <[email protected]>
Signed-off-by: Antoine Barthelemy <[email protected]>
@kislerdm kislerdm mentioned this pull request Oct 23, 2023
Copy link
Contributor

@kislerdm kislerdm left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution Antoine!

Let's merge this change after #10 so we could release v1.0.1 with corrected documentation using github workflow. WDYT?

cc: @Yantrio

@Ant0wan
Copy link
Contributor Author

Ant0wan commented Oct 26, 2023

Just updated the PR description here too.

@Yantrio Yantrio merged commit b06654f into opentofu:main Oct 27, 2023
38 checks passed
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