Skip to content

Commit 2b55375

Browse files
authored
[Internal] Migrate workflows that need write access to use hosted runners (#1112)
Fixes #1111.
1 parent 03fb268 commit 2b55375

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

.github/workflows/external-message.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ on:
1313

1414
jobs:
1515
comment-on-pr:
16-
runs-on: ubuntu-latest
16+
runs-on:
17+
group: databricks-deco-testing-runner-group
18+
labels: ubuntu-latest-deco
19+
1720
permissions:
1821
pull-requests: write
1922

@@ -44,13 +47,13 @@ jobs:
4447
gh pr comment ${{ github.event.pull_request.number }} --body \
4548
"<!-- INTEGRATION_TESTS_MANUAL -->
4649
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:
47-
50+
4851
Trigger:
4952
[go/deco-tests-run/sdk-go](https://go/deco-tests-run/sdk-go)
5053
5154
Inputs:
5255
* PR number: ${{github.event.pull_request.number}}
5356
* Commit SHA: \`${{ env.COMMIT_SHA }}\`
54-
57+
5558
Checks will be approved automatically on success.
5659
"

.github/workflows/integration-tests.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ on:
66
types: [opened, synchronize]
77

88
merge_group:
9-
9+
1010

1111
jobs:
1212
check-token:
1313
name: Check secrets access
14-
runs-on: ubuntu-latest
14+
15+
runs-on:
16+
group: databricks-deco-testing-runner-group
17+
labels: ubuntu-latest-deco
18+
1519
environment: "test-trigger-is"
1620
outputs:
1721
has_token: ${{ steps.set-token-status.outputs.has_token }}
@@ -29,11 +33,15 @@ jobs:
2933
3034
trigger-tests:
3135
name: Trigger Tests
32-
runs-on: ubuntu-latest
36+
37+
runs-on:
38+
group: databricks-deco-testing-runner-group
39+
labels: ubuntu-latest-deco
40+
3341
needs: check-token
3442
if: github.event_name == 'pull_request' && needs.check-token.outputs.has_token == 'true'
3543
environment: "test-trigger-is"
36-
44+
3745
steps:
3846
- uses: actions/checkout@v3
3947

@@ -45,22 +53,26 @@ jobs:
4553
private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }}
4654
owner: ${{ secrets.ORG_NAME }}
4755
repositories: ${{secrets.REPO_NAME}}
48-
56+
4957
- name: Trigger Workflow in Another Repo
5058
env:
5159
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
5260
run: |
5361
gh workflow run sdk-go-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
5462
--ref main \
5563
-f pull_request_number=${{ github.event.pull_request.number }} \
56-
-f commit_sha=${{ github.event.pull_request.head.sha }}
64+
-f commit_sha=${{ github.event.pull_request.head.sha }}
65+
5766
58-
5967
# The hash for the merge queue may not be the same as the hash for the PR.
6068
# Auto approve the check for the merge queue to avoid running integration tests twice.
6169
auto-approve:
6270
if: github.event_name == 'merge_group'
63-
runs-on: ubuntu-latest
71+
72+
runs-on:
73+
group: databricks-deco-testing-runner-group
74+
labels: ubuntu-latest-deco
75+
6476
steps:
6577
- name: Mark Check
6678
env:
@@ -71,4 +83,4 @@ jobs:
7183
-H "X-GitHub-Api-Version: 2022-11-28" \
7284
/repos/${{ github.repository }}/statuses/${{ github.sha }} \
7385
-f 'state=success' \
74-
-f 'context=Integration Tests Check'
86+
-f 'context=Integration Tests Check'

0 commit comments

Comments
 (0)