-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.66 KB
/
produce_report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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."