Release scheduler #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) Microsoft Corporation | |
# SPDX-License-Identifier: MIT | |
# This workflow is triggered on the first day of every month, and creates an issue for releasing eBPF for Windows. | |
name: Release scheduler | |
on: | |
schedule: | |
- cron: 0 0 1 * * | |
permissions: | |
contents: read | |
jobs: | |
create_release_issue: | |
name: Create release task | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- name: Create release task | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea | |
env: | |
TITLE: Scheduled eBPF release is due | |
LABELS: release | |
BODY: | | |
This is an automated reminder that a new release for eBPF is scheduled to be created: | |
1. Follow instructions in [ReleaseProcess.md](https://github.com/microsoft/ebpf-for-windows/blob/main/docs/ReleaseProcess.md). | |
1. Sync the internal `mscodehub` and follow the internal release instructions in `\.internal\docs\ReleaseEbpfRedistProcess.md`. | |
with: | |
script: | | |
const owner = process.env.GITHUB_REPOSITORY.split('/')[0] | |
const repo = process.env.GITHUB_REPOSITORY.split('/')[1] | |
const body = process.env.BODY; | |
const title = process.env.TITLE; | |
const labels = process.env.LABELS; | |
const label_array = labels ? labels.split(',') : []; | |
console.log(`Creating issue ${title}`); | |
await github.rest.issues.create({ | |
owner: owner, | |
repo: repo, | |
title: title, | |
body: body, | |
labels: label_array, | |
}); |