-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathassign_next_release_milestone.yml
More file actions
50 lines (42 loc) · 1.31 KB
/
assign_next_release_milestone.yml
File metadata and controls
50 lines (42 loc) · 1.31 KB
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: Assign `Next Release` Milestone
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
workflow_dispatch:
inputs:
dry_run:
description: 'To run in test mode (no changes made), set to true'
required: false
default: false
type: boolean
jobs:
assign-milestone:
runs-on: ubuntu-22.04
steps:
- name: Load secrets from 1Password
id: onepw_secrets
uses: 1password/load-secrets-action@v2.0.0
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
GH_TOKEN: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/GitHub generic action token for all repos/credential"
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Node.js
uses: actions/setup-node@v4.4.0
with:
node-version: 22
- name: Install dependencies
run: npm install @octokit/rest
- name: Run milestone assignment
env:
GITHUB_TOKEN: ${{ env.GH_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
run: node scripts/assign-next-release-milestone.js