Skip to content

Commit 4897f1c

Browse files
committed
feat: allow single ami release option to publish to prod
1 parent 35ad54c commit 4897f1c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ami-release-nix-single.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: true
1313
type: string
1414
default: 'main'
15+
release_to_prod:
16+
description: 'Release AMI to production (will also create GitHub release)'
17+
required: false
18+
type: boolean
19+
default: false
1520

1621
permissions:
1722
contents: write
@@ -105,12 +110,14 @@ jobs:
105110
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
106111
107112
- name: configure aws credentials - prod
113+
if: ${{ github.event.inputs.release_to_prod == 'true' }}
108114
uses: aws-actions/configure-aws-credentials@v4
109115
with:
110116
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
111117
aws-region: "us-east-1"
112118

113119
- name: Upload software manifest to s3 prod
120+
if: ${{ github.event.inputs.release_to_prod == 'true' }}
114121
run: |
115122
cd ansible
116123
ansible-playbook -i localhost \
@@ -120,10 +127,12 @@ jobs:
120127
manifest-playbook.yml
121128
122129
- name: Upload nix flake revision to s3 prod
130+
if: ${{ github.event.inputs.release_to_prod == 'true' }}
123131
run: |
124132
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
125133
126134
- name: Create release
135+
if: ${{ github.event.inputs.release_to_prod == 'true' }}
127136
uses: softprops/action-gh-release@v2
128137
with:
129138
name: ${{ steps.process_release_version.outputs.version }}

0 commit comments

Comments
 (0)