Skip to content

Commit 220ccf9

Browse files
committed
fix: always set AWS region for AWS-related actions
1 parent 9524496 commit 220ccf9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/actions/build-ami/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ runs:
5454
POSTGRES_MAJOR_VERSION: ${{ inputs.postgres_version }}
5555
AWS_MAX_ATTEMPTS: 10
5656
AWS_RETRY_MODE: adaptive
57+
AWS_REGION: ${{ inputs.region }}
5758
run: |
5859
nix run .#build-ami -- stage1 \
5960
-var "git-head-version=${{ inputs.git_sha }}" \
@@ -73,6 +74,7 @@ runs:
7374
PACKER_EXECUTION_ID: ${{ env.EXECUTION_ID }}
7475
AWS_MAX_ATTEMPTS: 10
7576
AWS_RETRY_MODE: adaptive
77+
AWS_REGION: ${{ inputs.region }}
7678
run: |
7779
nix run .#build-ami -- stage2 \
7880
-var "git-head-version=${{ inputs.git_sha }}" \

.github/actions/nix-install-ephemeral/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
description: 'Whether to push build outputs to the Nix binary cache'
66
required: false
77
default: 'false'
8+
aws-region:
9+
description: 'AWS region for the Nix binary cache S3 bucket'
10+
required: false
11+
default: 'us-east-1'
812
runs:
913
using: 'composite'
1014
steps:
@@ -13,7 +17,7 @@ runs:
1317
if: ${{ inputs.push-to-cache == 'true' }}
1418
with:
1519
role-to-assume: ${{ env.DEV_AWS_ROLE }}
16-
aws-region: "us-east-1"
20+
aws-region: ${{ inputs.aws-region }}
1721
output-credentials: true
1822
role-duration-seconds: 7200
1923
- name: Setup AWS credentials for Nix

.github/workflows/testinfra-ami-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
uses: ./.github/actions/nix-install-ephemeral
7474
with:
7575
push-to-cache: 'true'
76+
aws-region: "ap-southeast-1"
7677
env:
7778
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
7879
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}

0 commit comments

Comments
 (0)