add bombnp to bosf23 #160
This file contains 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 | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
jobs: | |
pulumi: | |
runs-on: ubuntu-latest | |
env: | |
PULUMI_CONFIG_PASSPHRASE: 3/us0aCSM/dofZEI | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: access token | |
id: githubAppAuth | |
if: env.GH_APP_CREDENTIALS_TOKEN | |
run: | | |
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.GH_APP_CREDENTIALS_TOKEN }})" | |
echo "::add-mask::$TOKEN" | |
echo "::set-output name=token::$TOKEN" | |
env: | |
GH_APP_CREDENTIALS_TOKEN: ${{ secrets.GH_APP_CREDENTIALS_TOKEN }} | |
- name: get stack | |
uses: actions/checkout@v3 | |
with: | |
repository: "creatorsgarten/stack" | |
token: ${{ steps.githubAppAuth.outputs.token || secrets.GITHUB_TOKEN }} | |
path: stack | |
- name: install | |
run: pnpm -r i --frozen-lockfile | |
- name: get pulumi | |
run: curl -fsSL https://get.pulumi.com | sh | |
- name: prepare | |
run: | | |
~/.pulumi/bin/pulumi login --local | |
~/.pulumi/bin/pulumi stack init gh | |
~/.pulumi/bin/pulumi stack select gh | |
~/.pulumi/bin/pulumi stack import --file=stack/stack.json | |
- name: preview | |
run: ~/.pulumi/bin/pulumi preview | |
- name: execute | |
run: ~/.pulumi/bin/pulumi up --yes | |
env: | |
GITHUB_TOKEN: ${{ steps.githubAppAuth.outputs.token }} | |
if: github.ref == 'refs/heads/main' | |
- name: export | |
run: ~/.pulumi/bin/pulumi stack export --file=stack/stack.json | |
if: github.ref == 'refs/heads/main' | |
- name: print | |
run: cat stack/stack.json | |
if: github.ref == 'refs/heads/main' | |
- name: sync | |
run: ./sync.sh | |
if: github.ref == 'refs/heads/main' |