chore: update the pulumi stack name #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pulumi Deploy | |
on: | |
push: | |
paths: | |
- 'todo_app/**' | |
branches: | |
- main # Trigger on push to the main branch | |
jobs: | |
pulumi-deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./todo_app # Set the global working directory | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
repository-projects: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 # More information on this action can be found below in the 'AWS Credentials' section | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-session-name: GithubActionsSession | |
- name: Install Dependencies | |
working-directory: todo-app | |
run: | | |
pip install -r requirements.txt | |
- name: Configure Pulumi | |
working-directory: todo-app | |
run: | | |
pulumi stack select ExitoLab/todo-app/dev --non-interactive || pulumi stack init ExitoLab/todo-app/dev | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- uses: pulumi/actions@v3 | |
with: | |
command: preview | |
stack-name: ExitoLab/todo-app/dev | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- uses: pulumi/actions@v3 | |
with: | |
command: up | |
stack-name: ExitoLab/todo-app/dev | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} |