Skip to content

nuget_update

nuget_update #87

Workflow file for this run

# Copyright (c) Microsoft Corporation
# SPDX-License-Identifier: MIT
# This workflow updates NuGet packages and creates a pull request with the changes.
name: nuget_update
on:
# Allow this workflow to be manually triggered.
workflow_dispatch:
# Run this once a week on saturday at 9pm UTC.
schedule:
- cron: '0 21 * * 6'
permissions:
contents: read
jobs:
update:
permissions:
contents: write # for Git to git push
pull-requests: write # for PR creation
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ebpf-for-windows-demo.sln
BUILD_ARTIFACT_NAME: Build-x64
BUILD_CONFIGURATION: Release
BUILD_PLATFORM: x64
runs-on: windows-2022
steps:
# Check out the main repo.
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
# Only check out main repo, not submodules.
ref: ${{ github.event.workflow_run.head_branch }}
# Restore nuget packages used by the solution.
- name: Restore NuGet packages for ebpf-for-windows-demo
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
nuget restore ${{env.DEMO_SOLUTION_FILE}}
# Update nuget packages used by the solution.
- name: Update NuGet packages
run: |
nuget update -noninteractive -verbosity detailed ${{env.SOLUTION_FILE_PATH}}
# Create a pull request with the changes.
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update NuGet packages
title: Update NuGet packages
body: |
This is an automated pull request by the GitHub Action 'nuget_update'.
Please review the changes and merge if appropriate.
labels: |
automated pr
nuget update
branch: nuget_update_${{ hashFiles('**/packages.config') }}
base: ${{ github.event.workflow_run.head_branch }}