Skip to content

Commit c76f62b

Browse files
committed
Update contributor.yaml
1 parent a6469c4 commit c76f62b

File tree

4 files changed

+69
-5
lines changed

4 files changed

+69
-5
lines changed

.github/workflows/contributor.yaml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
build:
1313
name: Build
14-
if: ${{ github.event.issue.pull_request && (contains(github.event.comment.body, 'please do this')) }}
14+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please do this') && contains(fromJson('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)}}
1515
timeout-minutes: 80
1616
runs-on: ubuntu-latest
1717

@@ -21,10 +21,36 @@ jobs:
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}
2323

24-
- name: Configure git to use https
25-
run: git config --global hub.protocol https
26-
2724
- name: Checkout the branch from the PR that triggered the job
2825
run: hub pr checkout ${{ github.event.issue.number }}
2926
env:
3027
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
ALPHA: ${{ secrets.ALPHA }}
29+
- name: Checkout the branch from the PR that triggered the job
30+
run: echo "Hello ${{ secrets.FOO }}"
31+
32+
# - name: Trigger Kubernetes Tests
33+
# uses: aktechlabs/nebari/.github/workflows/kubernetes_test.yaml@main
34+
# with:
35+
# pr_number: ${{ github.event.issue.number }}
36+
37+
kubernetes-tests:
38+
name: Contributor
39+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please do this') && contains(fromJson('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)}}
40+
uses: aktechlabs/nebari/.github/workflows/kubernetes_test.yaml@release/2022.11.1
41+
with:
42+
pr_number: ${{ github.event.issue.number }}
43+
44+
infracost-tests:
45+
name: Contributor
46+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please do this') && contains(fromJson('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)}}
47+
uses: aktechlabs/nebari/.github/workflows/infracost.yml@release/2022.11.1
48+
with:
49+
pr_number: ${{ github.event.issue.number }}
50+
51+
provider-tests:
52+
name: Contributor
53+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please do this') && contains(fromJson('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)}}
54+
uses: aktechlabs/nebari/.github/workflows/test-provider.yaml@release/2022.11.1
55+
with:
56+
pr_number: ${{ github.event.issue.number }}

.github/workflows/infracost.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
paths:
66
- 'nebari/template/stages/02-infrastructure'
77
- '.github/workflows/infracost.yml'
8+
workflow_call:
9+
inputs:
10+
pr_number:
11+
required: true
12+
type: string
813

914
env:
1015
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -38,6 +43,12 @@ jobs:
3843
with:
3944
ref: '${{ github.event.pull_request.base.ref }}'
4045

46+
- name: Checkout the branch from the PR that triggered the job
47+
if: ${{ github.event_name == 'issue_comment' }}
48+
run: hub pr checkout ${{ inputs.pr_number }}
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
4152
# Detects changes in the infrastructure for each specific cloud service provider
4253
- name: Detect changed infrastructure
4354
uses: dorny/paths-filter@v2

.github/workflows/kubernetes_test.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,38 @@ on:
2424
- "nebari/**"
2525
- "setup.cfg"
2626
- "pyproject.yoml"
27+
workflow_call:
28+
inputs:
29+
pr_number:
30+
required: true
31+
type: string
2732

2833
jobs:
2934
test-kubernetes:
3035
name: "Kubernetes Tests"
31-
runs-on: "cirun-runner--${{ github.run_id }}"
36+
# runs-on: "cirun-runner--${{ github.run_id }}"
37+
runs-on: "ubuntu-latest"
3238
defaults:
3339
run:
3440
shell: bash -l {0}
3541
steps:
42+
3643
- name: "Set NEBARI_IMAGE_TAG=main"
3744
run: |
3845
echo "NEBARI_IMAGE_TAG=main" >> "$GITHUB_ENV"
3946
echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}"
4047
echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}"
4148
echo "GITHUB_REF: ${GITHUB_REF}"
49+
4250
- name: 'Checkout Infrastructure'
4351
uses: actions/checkout@main
52+
53+
- name: Checkout the branch from the PR that triggered the job
54+
if: ${{ github.event_name == 'issue_comment' }}
55+
run: hub pr checkout ${{ inputs.pr_number }}
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
4459
- name: Set up Python
4560
uses: conda-incubator/setup-miniconda@v2
4661
env:

.github/workflows/test-provider.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ on:
2424
- "nebari/**"
2525
- "setup.cfg"
2626
- "pyproject.yoml"
27+
workflow_call:
28+
inputs:
29+
pr_number:
30+
required: true
31+
type: string
2732

2833
env:
2934
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
@@ -55,6 +60,13 @@ jobs:
5560
steps:
5661
- name: 'Checkout Infrastructure'
5762
uses: actions/checkout@main
63+
64+
- name: Checkout the branch from the PR that triggered the job
65+
if: ${{ github.event_name == 'issue_comment' }}
66+
run: hub pr checkout ${{ inputs.pr_number }}
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
5870
- name: Set up Python
5971
uses: actions/setup-python@v1
6072
with:

0 commit comments

Comments
 (0)