Skip to content

Commit 30d7227

Browse files
committed
Add Go connection string
1 parent 953eea9 commit 30d7227

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/test-go-examples-in-atlas.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Test Go Code Examples against Atlas
22

33
on:
4-
pull_request:
4+
pull_request_target:
5+
types: [opened, synchronize]
56
paths:
67
- "go/examples/**"
78

@@ -10,7 +11,14 @@ jobs:
1011

1112
runs-on: ubuntu-latest
1213
steps:
14+
- name: Check access
15+
if: ${{ github.event.pull_request.author_association != 'COLLABORATOR' }}
16+
run: |
17+
echo "Event not triggered by a collaborator."
18+
exit 1
1319
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
1422
- name: Setup Go 1.21.x
1523
uses: actions/setup-go@v5
1624
with:
@@ -22,7 +30,7 @@ jobs:
2230
- name: Create environment file with connection string
2331
run: |
2432
cd go/
25-
echo "ATLAS_CONNECTION_STRING=\"${{secrets.ATLAS_CONNECTION_STRING}}\"" >> .env
33+
echo "ATLAS_CONNECTION_STRING=\"${{secrets.GO_CONNECTION_STRING}}\"" >> .env
2634
echo "ENV=\"Atlas\"" >> .env
2735
- name: Run tests
2836
run: |

0 commit comments

Comments
 (0)