@@ -30,30 +30,12 @@ jobs:
30
30
fetch-depth : 0
31
31
32
32
- name : Setup workspace
33
- uses : ' ./.github/actions/bootstrap'
33
+ uses : " ./.github/actions/bootstrap"
34
34
35
35
- name : Generate UUIDs for quickstarts
36
36
id : generate-uuids
37
37
run : cd utils && yarn generate-uuids
38
38
39
- - name : Temporarily disable branch protections
40
- id : disable-branch-protection
41
- if : always()
42
- uses : actions/github-script@v6
43
- with :
44
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
45
- script : |
46
- const result = await github.rest.repos.updateBranchProtection({
47
- owner: context.repo.owner,
48
- repo: context.repo.repo,
49
- branch: 'release',
50
- required_status_checks: null,
51
- restrictions: null,
52
- enforce_admins: null,
53
- required_pull_request_reviews: null
54
- })
55
- console.log("Result:", result)
56
-
57
39
- name : Commit changes
58
40
id : commit-changes
59
41
run : |
69
51
- name : Push Commit
70
52
if : env.commit == 'true'
71
53
run : git push origin HEAD
72
-
73
- - name : Re-enable branch protections
74
- id : enable-branch-protection
75
- if : always()
76
- uses : actions/github-script@v6
77
- with :
78
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
79
- script : |
80
- const result = await github.rest.repos.updateBranchProtection({
81
- owner: context.repo.owner,
82
- repo: context.repo.repo,
83
- branch: 'release',
84
- required_status_checks: {
85
- strict: true,
86
- contexts: [
87
- 'Validation / Image count and extension compliance',
88
- 'Validation / Ensure icons exist',
89
- 'Validation / Install plan ids exist',
90
- 'Validation / Data source ids exist',
91
- 'Validation / Install plan schema compliance',
92
- 'Validation / Data source schema compliance',
93
- 'Validation / Quickstart id are unique',
94
- 'Validation / Validate Quickstart Schema',
95
- 'Validation / Quickstart dashboard name is unique'
96
- ]
97
- },
98
- restrictions: {
99
- "users":[],
100
- "teams":[],
101
- "apps":[]
102
- },
103
- enforce_admins: true,
104
- required_pull_request_reviews: {
105
- dismiss_stale_reviews: true,
106
- required_approving_review_count: 1,
107
- dismissal_restrictions: {
108
- users: [],
109
- teams: []
110
- }
111
- }
112
- })
113
- console.log("Result:", result)
114
-
115
- # get-pr-number:
116
- # name: Get PR number
117
- # runs-on: ubuntu-latest
118
- # outputs:
119
- # pr-number: ${{ steps.output_pr_number.outputs.pr-number }}
120
- # steps:
121
- # - name: Download artifact
122
- # uses: dawidd6/action-download-artifact@v2
123
- # with:
124
- # workflow: submit_gate.yml
125
- # run_id: ${{ github.event.workflow_run.id }}
126
-
127
- # - name: Get PR number
128
- # id: output_pr_number
129
- # run: |
130
- # export PR_NUMBER=$(cat artifact/pr_number_submit.txt)
131
- # echo "pr-number=$PR_NUMBER" >> $GITHUB_OUTPUT
132
-
133
- # staging:
134
- # needs: [generate-uuid, get-pr-number]
135
- # uses: ./.github/workflows/reusable.quickstart_submission.yml
136
- # with:
137
- # pr-number: ${{ needs.get-pr-number.outputs.pr-number }}
138
- # dry-run: false
139
- # secrets:
140
- # nr-api-url: ${{ secrets.NR_API_URL_STAGING }}
141
- # nr-api-token: ${{ secrets.NR_API_TOKEN_STAGING }}
142
- # github-token: ${{ secrets.GITHUB_TOKEN }}
143
- # nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
144
-
145
- # production:
146
- # needs: [staging, get-pr-number]
147
- # uses: ./.github/workflows/reusable.quickstart_submission.yml
148
- # with:
149
- # pr-number: ${{ needs.get-pr-number.outputs.pr-number }}
150
- # dry-run: false
151
- # secrets:
152
- # nr-api-url: ${{ secrets.NR_API_URL }}
153
- # nr-api-token: ${{ secrets.NR_API_TOKEN }}
154
- # github-token: ${{ secrets.GITHUB_TOKEN }}
155
- # nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
156
-
157
- # eu-production:
158
- # needs: [staging, get-pr-number]
159
- # uses: ./.github/workflows/reusable.quickstart_submission.yml
160
- # with:
161
- # pr-number: ${{ needs.get-pr-number.outputs.pr-number }}
162
- # dry-run: false
163
- # secrets:
164
- # nr-api-url: ${{ secrets.NR_API_URL_EU }}
165
- # nr-api-token: ${{ secrets.NR_API_TOKEN_EU }}
166
- # github-token: ${{ secrets.GITHUB_TOKEN }}
167
- # nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
0 commit comments