https://pulumi.com logo
Title
h

hundreds-lunch-5706

03/23/2023, 10:07 PM
Is there a way to use poetry with the Pulumi GitHub action? Our program requires poetry but I am not sure how to integrate that into a workflow.
s

square-orange-24606

05/13/2023, 7:24 AM
@hundreds-lunch-5706 I your comment when i was looking for something similar. I did try this and used a minimal
requirements.txt
file just for the GH Action while everything else was handled with poetry. In the end I did away with the action since I could get the same utility just using poetry and the
pulumi
CLI. This kind of thing:
- name: Pulumi login
        run: poetry run pulumi login
      - name: Initialise stack
        run: |
          cp ./infrastructure/Pulumi.test.yaml \
            "./infrastructure/Pulumi.${{ env.ENV }}.yaml"
          poetry run pulumi stack init "orgname/${{ env.ENV }}" \
            --cwd ./infrastructure
      - name: Update stack
        run: |
          poetry run pulumi update --stack "orgname/${{ env.ENV }}" \
            --cwd ./infrastructure --non-interactive --yes
Lemme know if you want any more info.
h

hundreds-lunch-5706

05/15/2023, 1:47 AM
Thanks @square-orange-24606 we ended up doing the same thing, just not using the Pulumi action itself and opting to use poetry from the command line.