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

Pro 4734 check outdated deps #4301

Merged
merged 129 commits into from
Oct 4, 2023
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 Sep 26, 2023
8493973
check version
ETLaurent Sep 26, 2023
19ae46b
Revert "check version"
ETLaurent Sep 26, 2023
62afe24
remove output
ETLaurent Sep 26, 2023
fcada72
Revert "remove output"
ETLaurent Sep 26, 2023
1b44e18
npm install
ETLaurent Sep 26, 2023
f4889ec
try to print prevous step output
ETLaurent Sep 26, 2023
2a4213f
comment install
ETLaurent Sep 26, 2023
37444ec
print into result
ETLaurent Sep 26, 2023
6c07c2b
remove matrix
ETLaurent Sep 26, 2023
50524bd
try to make it work
ETLaurent Sep 26, 2023
df139b1
try
ETLaurent Sep 26, 2023
93e385f
try again
ETLaurent Sep 26, 2023
78050e0
try again 2
ETLaurent Sep 26, 2023
b654245
try again 3
ETLaurent Sep 26, 2023
e275a95
try again 4
ETLaurent Sep 26, 2023
0433db2
try again 5
ETLaurent Sep 26, 2023
6880f28
try again 6
ETLaurent Sep 26, 2023
98b07e3
try npm outdated
ETLaurent Sep 26, 2023
d66cbba
try 1
ETLaurent Sep 26, 2023
a67c986
try 2
ETLaurent Sep 26, 2023
c136d9f
try 3
ETLaurent Sep 26, 2023
7c13942
try 4
ETLaurent Sep 26, 2023
f513e18
try 5
ETLaurent Sep 26, 2023
09fb8d8
try 6
ETLaurent Sep 26, 2023
b42f04f
try 7
ETLaurent Sep 26, 2023
4b8c46e
try
ETLaurent Sep 26, 2023
c18a549
try
ETLaurent Sep 26, 2023
76a0d14
try
ETLaurent Sep 26, 2023
56b65c7
try
ETLaurent Sep 26, 2023
3c4efe9
try
ETLaurent Sep 26, 2023
e9d354d
try
ETLaurent Sep 26, 2023
20adf08
try
ETLaurent Sep 26, 2023
3a0a842
try
ETLaurent Sep 26, 2023
b5167e9
try
ETLaurent Sep 26, 2023
d9e8fc5
try
ETLaurent Sep 26, 2023
06458dc
try
ETLaurent Sep 26, 2023
ae4500d
try
ETLaurent Sep 26, 2023
9293daa
try
ETLaurent Sep 26, 2023
1864356
try
ETLaurent Sep 26, 2023
0bc2078
try
ETLaurent Sep 26, 2023
7901e19
try
ETLaurent Sep 26, 2023
52c58d6
try
ETLaurent Sep 26, 2023
9909ece
try
ETLaurent Sep 26, 2023
2193ff6
try
ETLaurent Sep 26, 2023
6feb4fa
try
ETLaurent Sep 26, 2023
47610ce
try
ETLaurent Sep 26, 2023
8d31626
try
ETLaurent Sep 26, 2023
cba3a2e
try
ETLaurent Sep 26, 2023
a6e5701
try
ETLaurent Sep 26, 2023
b9c5fb4
try
ETLaurent Sep 26, 2023
49b86a6
try
ETLaurent Sep 26, 2023
8f94c11
try
ETLaurent Sep 26, 2023
f439273
try
ETLaurent Sep 26, 2023
4603912
try
ETLaurent Sep 26, 2023
0c5e4d1
try
ETLaurent Sep 26, 2023
09f8c3c
try
ETLaurent Sep 26, 2023
a663e32
try
ETLaurent Sep 26, 2023
8c39c9a
try
ETLaurent Sep 26, 2023
9ad2582
try
ETLaurent Sep 26, 2023
75686a3
try
ETLaurent Sep 26, 2023
843645d
try
ETLaurent Sep 26, 2023
6e6eb26
try
ETLaurent Sep 26, 2023
0b833b6
try
ETLaurent Sep 26, 2023
4e2be95
try
ETLaurent Sep 26, 2023
aea25bd
try
ETLaurent Sep 26, 2023
b3d7a71
try
ETLaurent Sep 26, 2023
9a9b71f
try
ETLaurent Sep 26, 2023
17490a5
try
ETLaurent Sep 27, 2023
c6c7e64
try
ETLaurent Sep 27, 2023
61ade70
try
ETLaurent Sep 27, 2023
ff9de0a
try
ETLaurent Sep 27, 2023
9809993
try
ETLaurent Sep 27, 2023
f910e07
try
ETLaurent Sep 27, 2023
d906805
try
ETLaurent Sep 27, 2023
1689bde
try
ETLaurent Sep 27, 2023
badd6a5
try
ETLaurent Sep 27, 2023
d8d1d22
try
ETLaurent Sep 27, 2023
822e1ba
try
ETLaurent Sep 27, 2023
3fa7cd1
try
ETLaurent Sep 27, 2023
5244131
try
ETLaurent Sep 27, 2023
2189e45
try
ETLaurent Sep 27, 2023
a9bc7e9
try
ETLaurent Sep 27, 2023
483c9e0
try
ETLaurent Sep 27, 2023
032c049
try
ETLaurent Sep 27, 2023
c913a43
try
ETLaurent Sep 27, 2023
480ca17
try
ETLaurent Sep 27, 2023
781f75f
try
ETLaurent Sep 27, 2023
45b4427
try
ETLaurent Sep 27, 2023
51f1f15
try
ETLaurent Sep 27, 2023
5cdc1bb
try
ETLaurent Sep 27, 2023
f6eac16
try
ETLaurent Sep 27, 2023
daf8c00
try
ETLaurent Sep 27, 2023
e4de330
try
ETLaurent Sep 27, 2023
5b35255
try
ETLaurent Sep 27, 2023
38da0f5
try
ETLaurent Sep 27, 2023
41acbfb
try
ETLaurent Sep 27, 2023
bbda38c
try
ETLaurent Sep 27, 2023
2ecbcd8
try
ETLaurent Sep 27, 2023
3fc6b46
try
ETLaurent Sep 27, 2023
3207b37
try
ETLaurent Sep 27, 2023
8b96630
try
ETLaurent Sep 27, 2023
8458210
try
ETLaurent Sep 27, 2023
c79320f
try
ETLaurent Sep 27, 2023
6d887cd
try
ETLaurent Sep 27, 2023
510ae80
try
ETLaurent Sep 27, 2023
8b9c2e5
try
ETLaurent Sep 27, 2023
cd56fca
try
ETLaurent Sep 27, 2023
420af83
try
ETLaurent Sep 27, 2023
f7f7af1
try
ETLaurent Sep 27, 2023
4ebcd61
try
ETLaurent Sep 27, 2023
134e154
try
ETLaurent Sep 27, 2023
acf7287
try
ETLaurent Sep 27, 2023
126da1c
try
ETLaurent Sep 27, 2023
979fba0
try
ETLaurent Sep 27, 2023
e75b7ff
try
ETLaurent Sep 27, 2023
0b1c056
try
ETLaurent Sep 27, 2023
d61ae0b
try
ETLaurent Sep 27, 2023
307eb9c
try
ETLaurent Sep 27, 2023
c8521da
try
ETLaurent Sep 27, 2023
882cab9
try
ETLaurent Sep 27, 2023
e3e4d27
try
ETLaurent Sep 27, 2023
e590155
try
ETLaurent Sep 27, 2023
70f1008
try
ETLaurent Sep 27, 2023
c0bd65e
try
ETLaurent Sep 27, 2023
e9a0b34
try
ETLaurent Sep 27, 2023
591e74f
uncomment cron
ETLaurent Sep 27, 2023
462b5d7
better readability
ETLaurent Sep 27, 2023
94b09bf
run every week
ETLaurent Sep 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 28 additions & 22 deletions .github/workflows/outdated-dependencies.yml
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
Copy link
Contributor Author

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

Copy link
Member

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 though

Copy link
Contributor Author

@ETLaurent ETLaurent Sep 28, 2023

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

- 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 }}
Loading