Skip to content

Commit

Permalink
chore: pulumi refresh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schultz committed Jul 3, 2024
1 parent 24690d8 commit 5625ca3
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/refresh_production_resource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Refresh pulumi resource

on:
workflow_call:
inputs:
commit:
description: "Leave blank to use current HEAD, or provide an override commit SHA"
type: string
required: false
secrets:
PULUMI_ACCESS_TOKEN:
required: true

jobs:
ref:
name: Load Commit Ref
runs-on: ubuntu-latest
steps:
- id: ref
shell: bash
# Default to HEAD of the branch from
# which this workflow was triggered
run: |
echo "refspec=${{ inputs.commit || github.sha }}" >> $GITHUB_OUTPUT
outputs:
refspec: ${{ steps.ref.outputs.refspec }}
refresh_pulumi_resources:
name: Refresh Pulumi Resources
runs-on: ubuntu-latest
permissions: write-all
needs: [ref]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.ref.outputs.refspec }}
fetch-depth: 0
- name: Prepare to Deploy to AWS
uses: ./.github/actions/prepare_deploy_to_aws
- name: Refresh Pulumi resources
uses: pulumi/actions@v3
id: pulumi
with:
command: refresh
stack-name: production
upsert: false
work-dir: infra/aws

0 comments on commit 5625ca3

Please sign in to comment.