-
Notifications
You must be signed in to change notification settings - Fork 593
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
Pro 4734 check outdated deps #4301
Merged
Merged
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
17a5b8c
remove default message
ETLaurent 8493973
check version
ETLaurent 19ae46b
Revert "check version"
ETLaurent 62afe24
remove output
ETLaurent fcada72
Revert "remove output"
ETLaurent 1b44e18
npm install
ETLaurent f4889ec
try to print prevous step output
ETLaurent 2a4213f
comment install
ETLaurent 37444ec
print into result
ETLaurent 6c07c2b
remove matrix
ETLaurent 50524bd
try to make it work
ETLaurent df139b1
try
ETLaurent 93e385f
try again
ETLaurent 78050e0
try again 2
ETLaurent b654245
try again 3
ETLaurent e275a95
try again 4
ETLaurent 0433db2
try again 5
ETLaurent 6880f28
try again 6
ETLaurent 98b07e3
try npm outdated
ETLaurent d66cbba
try 1
ETLaurent a67c986
try 2
ETLaurent c136d9f
try 3
ETLaurent 7c13942
try 4
ETLaurent f513e18
try 5
ETLaurent 09fb8d8
try 6
ETLaurent b42f04f
try 7
ETLaurent 4b8c46e
try
ETLaurent c18a549
try
ETLaurent 76a0d14
try
ETLaurent 56b65c7
try
ETLaurent 3c4efe9
try
ETLaurent e9d354d
try
ETLaurent 20adf08
try
ETLaurent 3a0a842
try
ETLaurent b5167e9
try
ETLaurent d9e8fc5
try
ETLaurent 06458dc
try
ETLaurent ae4500d
try
ETLaurent 9293daa
try
ETLaurent 1864356
try
ETLaurent 0bc2078
try
ETLaurent 7901e19
try
ETLaurent 52c58d6
try
ETLaurent 9909ece
try
ETLaurent 2193ff6
try
ETLaurent 6feb4fa
try
ETLaurent 47610ce
try
ETLaurent 8d31626
try
ETLaurent cba3a2e
try
ETLaurent a6e5701
try
ETLaurent b9c5fb4
try
ETLaurent 49b86a6
try
ETLaurent 8f94c11
try
ETLaurent f439273
try
ETLaurent 4603912
try
ETLaurent 0c5e4d1
try
ETLaurent 09f8c3c
try
ETLaurent a663e32
try
ETLaurent 8c39c9a
try
ETLaurent 9ad2582
try
ETLaurent 75686a3
try
ETLaurent 843645d
try
ETLaurent 6e6eb26
try
ETLaurent 0b833b6
try
ETLaurent 4e2be95
try
ETLaurent aea25bd
try
ETLaurent b3d7a71
try
ETLaurent 9a9b71f
try
ETLaurent 17490a5
try
ETLaurent c6c7e64
try
ETLaurent 61ade70
try
ETLaurent ff9de0a
try
ETLaurent 9809993
try
ETLaurent f910e07
try
ETLaurent d906805
try
ETLaurent 1689bde
try
ETLaurent badd6a5
try
ETLaurent d8d1d22
try
ETLaurent 822e1ba
try
ETLaurent 3fa7cd1
try
ETLaurent 5244131
try
ETLaurent 2189e45
try
ETLaurent a9bc7e9
try
ETLaurent 483c9e0
try
ETLaurent 032c049
try
ETLaurent c913a43
try
ETLaurent 480ca17
try
ETLaurent 781f75f
try
ETLaurent 45b4427
try
ETLaurent 51f1f15
try
ETLaurent 5cdc1bb
try
ETLaurent f6eac16
try
ETLaurent daf8c00
try
ETLaurent e4de330
try
ETLaurent 5b35255
try
ETLaurent 38da0f5
try
ETLaurent 41acbfb
try
ETLaurent bbda38c
try
ETLaurent 2ecbcd8
try
ETLaurent 3fc6b46
try
ETLaurent 3207b37
try
ETLaurent 8b96630
try
ETLaurent 8458210
try
ETLaurent c79320f
try
ETLaurent 6d887cd
try
ETLaurent 510ae80
try
ETLaurent 8b9c2e5
try
ETLaurent cd56fca
try
ETLaurent 420af83
try
ETLaurent f7f7af1
try
ETLaurent 4ebcd61
try
ETLaurent 134e154
try
ETLaurent acf7287
try
ETLaurent 126da1c
try
ETLaurent 979fba0
try
ETLaurent e75b7ff
try
ETLaurent 0b1c056
try
ETLaurent d61ae0b
try
ETLaurent 307eb9c
try
ETLaurent c8521da
try
ETLaurent 882cab9
try
ETLaurent e3e4d27
try
ETLaurent e590155
try
ETLaurent 70f1008
try
ETLaurent c0bd65e
try
ETLaurent e9a0b34
try
ETLaurent 591e74f
uncomment cron
ETLaurent 462b5d7
better readability
ETLaurent 94b09bf
run every week
ETLaurent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,43 @@ | ||
name: Check outdated dependencies | ||
on: | ||
# TODO: uncomment schedule | ||
# schedule: | ||
# # Runs Mon-Fri at 0:00 UTC ( 00:00 EST ) | ||
# - cron: "0 0 * * 1-5" | ||
schedule: | ||
# Runs every Monday at 8:00 | ||
- cron: "0 8 * * MON" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check: | ||
check_outdated_dependencies: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18] | ||
# outputs: | ||
# output: ${{ steps.run_outdated.outputs }} | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- id: run_outdated | ||
run: npm outdated >> "$GITHUB_OUTPUT" | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Check outdated dependencies | ||
run: | | ||
echo "$(npm outdated)" > output | ||
npm outdated | ||
- name: Report Status | ||
if: always() | ||
uses: ravsamhq/notify-slack-action@v2 | ||
with: | ||
status: ${{ job.status }} | ||
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>" | ||
footer: "<{run_url}|View Run> | $GITHUB_OUTPUT" | ||
notify_when: "failure" | ||
notification_title: "outdated dependencies" | ||
if: failure() | ||
run: | | ||
outdated_dependencies=$(cat output) | ||
|
||
repo="${{ github.repository }}" | ||
repo_url="${{ github.server_url }}/$repo" | ||
run_url="$repo_url/actions/runs/${{ github.run_id }}" | ||
|
||
text="⚠️ The <$repo_url|$repo> project has outdated dependencies: | ||
\`\`\` | ||
$outdated_dependencies | ||
\`\`\` | ||
<$run_url|View Run>" | ||
|
||
payload="{\"text\": \"$text\"}" | ||
curl -X POST -H 'Content-type: application/json' --data "$payload" $SLACK_WEBHOOK_URL | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
way of getting the correct exit status
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.
npm outdated > output
should do this by itself 🤔 Unless your goal was just to always add a newline. Not wrong thoughThere 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 wasn't able to keep the exit status when writing the output into the
output
file, so I'm running the same command again... not pretty but it works and makes the step fail as expected.i.e:
echo "$(npm outdated)" > output
always exit 0