Skip to content

Switch to src layout and PDM #38

Switch to src layout and PDM

Switch to src layout and PDM #38

Workflow file for this run

name: Pulumi Preview
on:
workflow_dispatch:
pull_request:
branches: main
permissions:
contents: read
id-token: write
pull-requests: write
jobs:
pulumi-preview:
name: Preview infrastructure changes
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/hubverse_infrastructure
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
- name: Set up PDM 🐍
id: setup_pdm
# using the PDM action because actions/setup-python doesn't suppport
# caching for PDM out of the box
# https://github.com/pdm-project/setup-pdm?tab=readme-ov-file#why-do-i-need-this-action
uses: pdm-project/setup-pdm@v4
with:
cache: true
- name: Install dependencies πŸ“¦οΈ
run: |
echo "installing project dependencies"
pdm config python.use_venv false
pdm install
- name: Configure AWS credentials πŸ”
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::767397675902:role/hubverse-administration
aws-region: us-east-1
- name: Debug πŸ›
run: |
echo ${{ steps.setup_pdm.outputs.python-path }}
echo ${{ steps.setup_pdm.outputs.pdm-bin }}
pip list
pdm list
pdm venv list
echo "$PATH"
echo "$PYTHONPATH"
which python
env:
PYTHONPATH: .venv/bin
- name: Previewing infrastructure πŸ‘€
uses: pulumi/actions@v5
with:
command: preview
stack-name: bsweger/hubverse-aws/hubverse
comment-on-pr: true
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.BSWEGER_PULUMI_DEMO }}
PYTHONPATH: .venv/bin