|
8 | 8 | aws-region: |
9 | 9 | description: "AWS region to build AMI in" |
10 | 10 | required: false |
11 | | - default: "us-east-1" |
| 11 | + default: "eu-west-1" |
12 | 12 | ami-prefix: |
13 | 13 | description: "Prefix for AMI name" |
14 | 14 | required: false |
@@ -52,27 +52,30 @@ runs: |
52 | 52 | rustup toolchain install nightly |
53 | 53 | rustup component add --toolchain nightly rustfmt clippy rust-src miri llvm-tools-preview |
54 | 54 |
|
55 | | - - name: Install cargo tools |
56 | | - shell: bash |
57 | | - run: | |
58 | | - cargo install cargo-nextest --locked |
59 | | - cargo install cargo-hack --locked |
60 | | - cargo install grcov --locked |
| 55 | +# - name: Install cargo tools |
| 56 | +# shell: bash |
| 57 | +# run: | |
| 58 | +# cargo install cargo-nextest --locked |
| 59 | +# cargo install cargo-hack --locked |
| 60 | +# cargo install grcov --locked |
61 | 61 |
|
62 | 62 | - name: Create AMI |
63 | 63 | id: create-ami |
64 | 64 | shell: bash |
65 | 65 | env: |
66 | | - AWS_REGION: ${{ inputs.aws-region }} |
67 | 66 | AMI_PREFIX: ${{ inputs.ami-prefix }} |
68 | 67 | ARCH: ${{ inputs.arch }} |
69 | 68 | RETENTION_DAYS: ${{ inputs.retention-days }} |
70 | 69 | run: | |
| 70 | + # Use the region where the instance is running |
| 71 | + export AWS_REGION="$RUNS_ON_AWS_REGION" |
| 72 | + export AWS_DEFAULT_REGION="$RUNS_ON_AWS_REGION" |
| 73 | +
|
71 | 74 | TIMESTAMP=$(date +%Y%m%d-%H%M%S) |
72 | 75 | AMI_NAME="${AMI_PREFIX}-${ARCH}-${TIMESTAMP}" |
73 | 76 | DEPRECATION_TIME=$(date -u -d "+${RETENTION_DAYS} days" +%Y-%m-%dT%H:%M:%SZ) |
74 | 77 |
|
75 | | - echo "Creating AMI: $AMI_NAME from instance $RUNS_ON_INSTANCE_ID" |
| 78 | + echo "Creating AMI: $AMI_NAME from instance $RUNS_ON_INSTANCE_ID in region $AWS_REGION" |
76 | 79 | AMI_ID=$(aws ec2 create-image \ |
77 | 80 | --instance-id "$RUNS_ON_INSTANCE_ID" \ |
78 | 81 | --name "$AMI_NAME" \ |
|
0 commit comments