In the page that opens, click on the pipelines that are running to see the progress. When finished, you should see something like the screenshot below: Pulumi Pipeline Task And if you open your Twilio account, you will see that the workflow has been created. As a test, you can now try updating the resources in the file index.js (by changing the collaborator name as we did in Part 1 for example), and see how the pipeline runs automatically once you commit the file. The resources in your Twilio account change accordingly. Create a new pipeline with GitHub Actions To get started, log in to your GitHub account and create a new repository.
To follow the steps, you can use the web interface or git to add the following philippines whatsapp number files to the repository: Pulumi.yaml index.js package.json Now, in the same directory, create a folder called .github followed by a subfolder called workflows. Then, in the directory workflows, create a file called push.yaml in that folder. The contents of the file should be as follows: YAML Copy the code name: Deploy resources on: push: branches: - main jobs: up: name: Update runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 1 - uses: actions/setup-node@v1 with: node-version: 12.
x - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v1 - run: npm install - uses: pulumi/actions@v3 with: command: up stack-name: dev env: PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }} TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} This "Update" workflow is triggered when a new commit is pushed to the branch main. To learn more about triggers and branches, see Workflow syntax for GitHub Actions . Now commit this file and open the Settings tab of the GitHub repository. In the left navigation bar, click Secrets and add the following variables: PULUMI_ACCESS_TOKEN : token you created in Pulumi dashboard TWILIO_ACCOUNT_SID : SID of the Twilio account you want to deploy your resources to (make sure this account does not contain any resources created via the same file) TWILIO_AUTH_TOKEN : authentication token of the Twilio account specified above You are now ready to run the actions in your GitHub workflow.
To follow the steps,
-
- Posts: 10
- Joined: Sun Dec 22, 2024 5:33 am