forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.52 KB
/
gradually-deprecated.yaml
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: Check for new usages of deprecated functionality
permissions:
contents: read
pull-requests: write
on:
pull_request_target:
types: ['opened', 'synchronize']
paths:
- '.github/workflows/gradually-deprecated.yaml'
- '**.go'
- './scripts/run-gradually-deprecated.sh'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version-file: ./.go-version
- run: bash ./scripts/run-gradually-deprecated.sh
- name: Add waiting-response on fail
if: failure()
uses: actions-ecosystem/action-add-labels@v1
with:
labels: waiting-response
github_token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.number }}
repo: ${{ github.event.repository.full_name }}
- name: Get run url
if: failure()
run: |
echo "gha_url=https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" >> $GITHUB_ENV
- name: Send build failure comment
if: failure()
uses: actions/github-script@v6
with:
result-encoding: string
script: |
github.rest.issues.createComment({
issue_number: ${{ github.event.number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: '<b>Build failure</b> \n\n Found new usages of deprecated functionality: \n\n ${{ env.gha_url}}'
})