-
Notifications
You must be signed in to change notification settings - Fork 933
docs: fix github actions ci example #3892
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,26 +19,21 @@ jobs: | |
commitlint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Install required dependencies | ||
run: | | ||
apt update | ||
apt install -y sudo | ||
sudo apt install -y git curl | ||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - | ||
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs | ||
- name: Print versions | ||
run: | | ||
git --version | ||
node --version | ||
npm --version | ||
npx commitlint --version | ||
|
||
- name: Install commitlint | ||
run: | | ||
npm install conventional-changelog-conventionalcommits | ||
npm install commitlint@latest | ||
run: npm install --global @commitlint/{cli,config-conventional} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @letsaguiar are you sure this syntax is correct? I've tried it myself in a repo of mine because I thought it would be nice to adopt it, and I'm getting this error:
( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting thing is that the above syntax works when you're running your CI job without a |
||
|
||
- name: Validate current commit (last commit) with commitlint | ||
if: github.event_name == 'push' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@letsaguiar and why dont you like printing versions 😭 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short answer: I don't think it's useful since we already know which version of git comes with Ubuntu 22.04 and which version of node we're installing
Long answer: an unnecessary step makes the pipeline slow and increase the cloud costs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those points apply to git and node, but not to the other 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, your long answer is shorter than your short answer 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the meaning is deeper haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to revert it :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good