Hey all! I have a question I couldn’t solve with t...
# general
s
Hey all! I have a question I couldn’t solve with the online resources. I have a simple GitHub Actions workflow to build the resources, with the following yaml file content:
Copy code
name: Build staging resources

on:
  push:
    branches:
    - develop
    paths-ignore:
      - "*.md"
      - "*.gitignore"

jobs:
  deploy:
    name: Build staging resources
    runs-on: ubuntu-latest
    steps:
      - uses: pulumi/actions@v3
        with:
          command: up
          stack-name: tachikoma/tachikoma-backend/staging
        env:
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
However, when pushing, I get the following output from GitHub Actions: `stderr: error: no Pulumi.yaml project file found (searching upwards from ). If you have not created a project yet, use
pulumi new
to do so` I don’t get it since I got a Pulumi.yaml file at the root of the project and I’m following the Pulumi GitHub Actions example. What did I got wrong?
g
Hey, you need to checkout your changes. Try to add additional step like this, before you execute pulumi action:
🙌 1
s
Hi @gray-vr-25374, will try that out, thanks!
It works, but I run into another issue:
Copy code
Exception: invoke of auth0:index/getTenant:getTenant failed: invocation of auth0:index/getTenant:getTenant returned an error: 1 error occurred:
      	* missing required configuration key "auth0:domain":
      Set a value using the command `pulumi config set auth0:domain <value>`.
How can I add a step to do the config
pulumi config set auth0:domain XXXXXXXXXXXXXX
? (I tried adding AUTH0_DOMAIN as a secret in GH instead, but with no success) Thanks again!!
Does the following make sense?
Copy code
name: Build staging resources

on:
  push:
    branches:
    - develop
    paths-ignore:
      - "*.md"
      - "*.gitignore"

env:
  PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}

jobs:
  deploy:
    name: Build staging resources
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Set auth0:domain config
        run: |
          pulumi config set auth0:domain ${{ secrets.AUTH0_DOMAIN }} -s tachikoma/tachikoma-backend/staging
          pulumi up -s tachikoma/tachikoma-backend/staging -y
      - name: Set auth0:client_id config
        run: |
          pulumi config set auth0:client_id ${{ secrets.AUTH0_CLIENT_ID }} -s tachikoma/tachikoma-backend/staging
      - name: Set auth0:client_secret config
        run: |
          pulumi config set auth0:client_secret ${{ secrets.AUTH0_CLIENT_SECRET }} -s tachikoma/tachikoma-backend/staging
      - uses: pulumi/actions@v3
        with:
          command: up
          stack-name: tachikoma/tachikoma-backend/staging
g
I assume that you need to set credentials for Azure. Usually for this purpose I use environment variables that initialized from Github secrets. Try to use this article, basically you need to set those envs:
s
@gray-vr-25374 Thanks. In my case it’s AWS. The error is about credentials for auth0 though. Will check out AWS credentials
Success! Thanks @gray-vr-25374. FYI in case it can be useful to someone:
Copy code
name: Build staging resources

on:
  push:
    branches:
    - develop
    paths-ignore:
      - "*.md"
      - "*.gitignore"

env:
  PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}

jobs:
  deploy:
    name: Build staging resources
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-region: ${{ secrets.AWS_REGION }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      - name: Set auth0 config
        run: |
          pulumi config set auth0:domain ${{ secrets.AUTH0_DOMAIN }} -s tachikoma/tachikoma-backend/staging
          pulumi config set auth0:client_id ${{ secrets.AUTH0_CLIENT_ID }} --secret -s tachikoma/tachikoma-backend/staging
          pulumi config set auth0:client_secret ${{ secrets.AUTH0_CLIENT_SECRET }} --secret -s tachikoma/tachikoma-backend/staging
      - name: Deploy resources with Pulumi
        uses: pulumi/actions@v3
        with:
          command: up
          stack-name: tachikoma/tachikoma-backend/staging
🙌 1