-
Notifications
You must be signed in to change notification settings - Fork 16
54 lines (46 loc) · 1.74 KB
/
test-deploy-owners.yml
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
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: test-deploy-owners
env:
# CI variables
DOCKER_PLATFORM: "amd64"
# Indexer variables
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_PROJECT_ID: "opensource-observer"
PR_TOOLS_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PR_TOOLS_GITHUB_APP_PRIVATE_KEY}}
PR_TOOLS_GITHUB_APP_ID: ${{ secrets.PR_TOOLS_GITHUB_APP_ID }}
# should not be set to a legitimate value for testing. This will use up API
# quota otherwise
DUNE_API_KEY: "none"
# Trigger the workflow when:
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
# Cancel in progress jobs on new pushes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-deploy:
name: Test Deployment Initializer
if: ${{ github.event.pull_request }}
environment: external-prs-app
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup external pr tools
uses: ./.github/workflows/setup-external-pr-tools
- name: Initialize check
run: |
cd ops/external-prs &&
pnpm tools initialize-check ${{ github.repository }} ${{ github.event.pull_request.head.sha }}
- name: Run test-deploy
uses: ./.github/workflows/test-deploy
with:
sha: ${{ github.event.pull_request.head.sha }}
pr: ${{ github.event.pull_request.id }}
# This check isn't for security it's mostly a convenience so this won't
# fail and muddy up the actions UI
if: ${{ contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) }}