Release scheduler #1
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) eBPF for Windows contributors | |
# 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@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
- 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: | |
- [ ] Ensure SPGO data is regenerated and added to the repo using performance test suite. | |
- [ ] Follow instructions in [ReleaseProcess.md](https://github.com/microsoft/ebpf-for-windows/blob/main/docs/ReleaseProcess.md). | |
- [ ] Sync the internal `undock` 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, | |
}); |