Skip to content

Commit b074e69

Browse files
committed
call main build directly from nightly build
1 parent e2a6c4c commit b074e69

File tree

2 files changed

+15
-41
lines changed

2 files changed

+15
-41
lines changed

.github/workflows/main-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
- "release/v*"
88
- ci-workflow
99
workflow_dispatch: # be able to run the workflow on demand
10+
workflow_call:
11+
inputs:
12+
ref:
13+
description: 'Git ref to checkout'
14+
required: false
15+
type: string
1016
env:
1117
AWS_DEFAULT_REGION: us-east-1
1218
STAGING_ECR_REGISTRY: 637423224110.dkr.ecr.us-east-1.amazonaws.com
@@ -34,6 +40,8 @@ jobs:
3440
steps:
3541
- name: Checkout Repo @ SHA - ${{ github.sha }}
3642
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
43+
with:
44+
ref: ${{ inputs.ref || github.sha }}
3745

3846
- name: Get Python Distro Output
3947
id: python_output

.github/workflows/nightly-build.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -89,46 +89,12 @@ jobs:
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9090

9191
build-and-test:
92-
runs-on: ubuntu-latest
9392
needs: update-and-create-pr
9493
if: needs.update-and-create-pr.outputs.has_changes == 'true'
95-
96-
steps:
97-
- name: Checkout repository
98-
uses: actions/checkout@v4
99-
with:
100-
ref: nightly-dependency-updates
101-
102-
- name: Set up Python
103-
uses: actions/setup-python@v4
104-
with:
105-
python-version: '3.11'
106-
107-
- name: Install build tools
108-
run: |
109-
python -m pip install --upgrade pip
110-
pip install build pytest toml requests
111-
112-
- name: Build and test
113-
uses: ./.github/actions/artifacts_build
114-
with:
115-
image_uri_with_tag: adot-python-nightly:snapshot
116-
push_image: false
117-
load_image: true
118-
python_version: "3.11"
119-
package_name: aws-opentelemetry-distro
120-
os: ubuntu-latest
121-
122-
- name: Build and Test Lambda Layer
123-
uses: ./.github/actions/lambda_artifacts_build
124-
with:
125-
python_version: "3.12"
126-
layer_directory: lambda-layer
127-
staging_s3_bucket: "nightly-test-bucket"
128-
os: ubuntu-latest
129-
130-
- name: Run contract tests
131-
run: |
132-
bash scripts/set-up-contract-tests.sh
133-
pip install pytest
134-
pytest contract-tests/tests
94+
uses: ./.github/workflows/main-build.yml
95+
secrets: inherit
96+
permissions:
97+
id-token: write
98+
contents: read
99+
with:
100+
ref: nightly-dependency-updates

0 commit comments

Comments
 (0)