Skip to content

Commit

Permalink
trying to get the list
Browse files Browse the repository at this point in the history
trying to get the list of outdated packages in Slack
  • Loading branch information
devarsh10 authored Dec 24, 2024
1 parent ec2c417 commit 5dea63c
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,21 @@ jobs:
- name: Install Dependencies
run: npm install

# Check for outdated packages and capture output
# Check for outdated packages and save output
- name: Check Outdated Packages
id: outdated-packages
run: |
npm outdated > outdated_packages.txt || echo "No outdated packages found" > outdated_packages.txt.
echo "outdated_packages=$OUTPUT" >> $GITHUB_ENV
# Save the result as an output variable
shell: bash
env:
OUTPUT_FILE: outdated_packages.txt

# Notify Slack with outdated packages
npm outdated || echo "No outdated packages found" > outdated_packages.txt
cat outdated_packages.txt
continue-on-error: true

# Read the output and send it to Slack
- name: Notify Slack - Outdated Packages
uses: act10ns/slack@v2
with:
status: success
channel: '#github-to-slack-notification'
message: |
Following outdated packages found:
${{ env.outdated_packages }}
```$(cat outdated_packages.txt)```
if: always()

0 comments on commit 5dea63c

Please sign in to comment.