Skip to content

Monthly Dependabot Report #46

Monthly Dependabot Report

Monthly Dependabot Report #46

name: Monthly Dependabot Report
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
env:
SLACK_CHANNEL: C0214CF01A8 # front-end-arch
jobs:
run_report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Generate GH Auth Token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: "Generate the report"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
{
echo 'REPORT_OUTPUT<<EOF'
echo '```'
bundle exec ruby dependabot_report.rb
echo '```'
echo 'EOF'
} >> "$GITHUB_ENV"
- name: Post to Slack
uses: archive/github-actions-slack@v2.6.0
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ env.SLACK_CHANNEL }}
slack-text: ${{ env.REPORT_OUTPUT }}
- name: Send failure message
if: ${{ failure() }}
uses: archive/github-actions-slack@v2.6.0
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ env.SLACK_CHANNEL }}
slack-optional-link_names: true
slack-text: ":x: :github: Something went wrong trying to run the Dependabot Report. Please check the <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}|Dependabot Report run> for more information."