Skip to content

update dependabot.yml #187

update dependabot.yml

update dependabot.yml #187

# The name used in the GitHub UI for the workflow
name: "update dependabot.yml"
# When to run this action:
# - Scheduled to run at 5 AM every Monday.
# - Manually runnable from the GitHub UI with a reason
on:
schedule:
- cron: "0 5 * * 1" # 5 AM every Monday.
workflow_dispatch:
inputs:
reason:
description: "The reason for running the workflow"
required: true
default: "Manual run"
# Run on the latest version of Ubuntu
permissions:
contents: read
jobs:
dependabot-bot:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
# Checkout the repo into the workspace within the VM
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# - name: Setup .NET
# uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0
# with:
# dotnet-version: 7.0.x
# dotnet-quality: 'preview'
# If triggered manually, print the reason why
- name: "Print manual run reason"
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "Reason: $REASON"
env:
REASON: ${{ github.event.inputs.reason }}
# Run the .NET dependabot-bot tool
- name: dependabot-bot
id: dependabot-bot
uses: dotnet/docs-tools/actions/dependabot-bot@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
root-directory: "/github/workspace"
dependabot-yml-path: ".github/dependabot.yml"
- name: Create pull request
if: github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet'
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 #v8.0.0
with:
branch: create-dependabotconfig-pull-request/patch
title: "Update dependabot.yml - automatically."
body: ".NET dependabot-bot automated PR. 🤖"
commit-message: ".NET dependabot-bot automated PR."