Skip to content

.github/workflows/direct.yml #15

.github/workflows/direct.yml

.github/workflows/direct.yml #15

Workflow file for this run

on:
workflow_dispatch:
inputs:
pullRequestNumber:
type: string
required: true
default: '0'
externalId:
type: string
required: true
default: '0'
branchToCheckout:
type: string
required: true
default: 'feat/pytest'
jobs:
# build:
# runs-on: ubuntu-latest
# env:
# GH_TOKEN: ${{ github.token }}
# pullRequestNumber: ${{ inputs.pullRequestNumber }}
# externalId: ${{ inputs.externalId }}
# permissions:
# id-token: write
# contents: read
# checks: write
# pull-requests: read
# steps:
# - uses: actions/checkout@v4
# with:
# repository: 'awslabs/generative-ai-cdk-constructs'
# - name: Get the PR and test mergeability
# if: fromJSON(inputs.pullRequestNumber) > 0
# run: |-
# gh pr checkout ${{ inputs.pullRequestNumber }};
# git merge `gh pr view ${{ inputs.pullRequestNumber }} --json baseRefName | jq -r '.baseRefName'`
# echo "::group::Git Differences"
# git diff `gh pr view ${{ inputs.pullRequestNumber }} --json baseRefName | jq -r '.baseRefName'`..HEAD
# echo "::endgroup::"
# - uses: actions/setup-node@v4
# with:
# node-version: '20.x'
# cache: 'yarn'
# cache-dependency-path: 'yarn.lock'
# - run: |-
# npm install -g aws-cdk
# npx projen install
# npx projen default
# npx projen pre-compile
# npx projen compile
# npx projen post-compile
# npx projen package-all
# ls -lR ./dist/
# - name: package artifacts
# uses: actions/upload-artifact@v4
# with:
# name: dist
# path: |
# dist
samples:
runs-on: ubuntu-latest
# needs: build
env:
GH_TOKEN: ${{ github.token }}
pullRequestNumber: ${{ inputs.pullRequestNumber }}
externalId: ${{ inputs.externalId }}
permissions:
id-token: write
contents: read
checks: write
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
repository: 'aws-samples/generative-ai-cdk-constructs-samples'
ref: "${{ inputs.branchToCheckout }}"
- run: |-
cd "samples/python-samples"
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# cache: 'npm'
# cache-dependency-path: 'package-lock.json'
# - name: Download package
# uses: actions/download-artifact@v4
# with:
# name: dist
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# cache: 'pip'
# - run: |-
# ls -l;
# cat requirements.txt | sed -e 's/^cdklabs\.generative-ai-cdk-constructs.*$/file\:\.\/dist\/python\/cdklabs\.generative_ai_cdk_constructs-0\.0\.0-py3-none-any\.whl/g' > requirements-local.txt
# cat requirements-local.txt;
# # pip install -r requirements-local.txt
# # pip install -r requirements-dev.txt
# # pip freeze
# # pytest