-
Notifications
You must be signed in to change notification settings - Fork 161
57 lines (50 loc) · 1.87 KB
/
code_freeze_start.yml
File metadata and controls
57 lines (50 loc) · 1.87 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
51
52
53
54
55
56
57
name: Start code freeze
on:
workflow_dispatch:
milestone:
types: [opened, created, edited]
jobs:
start_code_freeze:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.milestone.title == 'Code Freeze' && github.event.milestone.state == 'open')
runs-on: ubuntu-latest
permissions:
contents: read
actions: read # read secrets
pull-requests: read # Fetches PRs
issues: write # Opens milestones
statuses: write # add a commit status check
id-token: write # required for dd-octo-sts OIDC token
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: Clone dd-trace-dotnet repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: octokit/request-action@786351db496fa66730d8faa09ef279108da175a3 # v2.x
name: 'Open Code Freeze Milestone'
id: milestones
if: github.event_name == 'workflow_dispatch'
with:
route: PATCH /repos/{owner}/{repo}/milestones/115
owner: DataDog
repo: dd-trace-dotnet
state: open
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: ./.github/actions/pr-status-updater
name: 'Freeze PRs'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
state: failure
workflow_name: code_freeze_start.yml # this allows for a click through to go to the action
- name: Get GitHub Token via dd-octo-sts
id: octo-sts
uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
with:
scope: DataDog/datadog-aas-extension
policy: dd-trace-dotnet.github.deploy-aas-dev-apps
- uses: ./.github/actions/deploy-aas-dev-apps
name: 'Trigger AAS deploy'
with:
github_token: ${{ steps.octo-sts.outputs.token }}