Skip to content

Commit 3a631bb

Browse files
committed
ci: push runner image to new-org ECR only
The old-org (412463071885) Talos stack is decommissioned. Drop the dual-push to both accounts and the old-account creds/login steps; build and push the runner image to the new account (114563866192) ECR only.
1 parent 4ff2b91 commit 3a631bb

1 file changed

Lines changed: 5 additions & 31 deletions

File tree

.github/workflows/aws-deployment.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,9 @@ permissions:
2121

2222
env:
2323
AWS_REGION: us-east-1
24-
# Old account (current prod). Push remains primary during migration.
25-
ECR_REGISTRY: 412463071885.dkr.ecr.us-east-1.amazonaws.com
24+
ECR_REGISTRY: 114563866192.dkr.ecr.us-east-1.amazonaws.com
2625
IMAGE_NAME: talos/arm-oeth
27-
AWS_ROLE_ARN: arn:aws:iam::412463071885:role/talos-gha-OriginProtocol-arm-oeth
28-
# New account (parallel stack). Dual-push best-effort while we cut over.
29-
# Drop these + the dual-push steps after the rolling swap; switch ECR_REGISTRY
30-
# + AWS_ROLE_ARN to the new account when this is the only push.
31-
NEW_ECR_REGISTRY: 114563866192.dkr.ecr.us-east-1.amazonaws.com
32-
NEW_AWS_ROLE_ARN: arn:aws:iam::114563866192:role/talos-gha-OriginProtocol-arm-oeth
26+
AWS_ROLE_ARN: arn:aws:iam::114563866192:role/talos-gha-OriginProtocol-arm-oeth
3327

3428
jobs:
3529
build:
@@ -44,16 +38,15 @@ jobs:
4438
with:
4539
ssh-private-key: ${{ secrets.TALOS_DEPLOY_KEY }}
4640

47-
- name: Configure AWS credentials (old account)
41+
- name: Configure AWS credentials
4842
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
4943
with:
5044
role-to-assume: ${{ env.AWS_ROLE_ARN }}
5145
aws-region: ${{ env.AWS_REGION }}
5246

53-
- name: Login to old ECR
47+
- name: Login to ECR
5448
uses: aws-actions/amazon-ecr-login@4625ce35226a7557230889aae2f52eb50ec3dcda # v2.0.1
5549

56-
# Old account is the primary push target; tag check gates the build.
5750
- name: Check if image tag already exists (ECR is IMMUTABLE)
5851
id: tag_exists
5952
run: |
@@ -68,29 +61,11 @@ jobs:
6861
echo "exists=false" >> "$GITHUB_OUTPUT"
6962
fi
7063
71-
# Layer in new-account creds so buildx can push to both ECRs from one
72-
# build. configure-aws-credentials overwrites AWS env vars, but the
73-
# ECR login above already cached old-account docker creds; the second
74-
# login adds new-account creds to the same docker config. buildx push
75-
# then uses docker's per-registry cache, not AWS env vars.
76-
- name: Configure AWS credentials (new account)
77-
if: steps.tag_exists.outputs.exists == 'false'
78-
id: aws_new
79-
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
80-
with:
81-
role-to-assume: ${{ env.NEW_AWS_ROLE_ARN }}
82-
aws-region: ${{ env.AWS_REGION }}
83-
role-session-name: dual-push-${{ github.run_id }}
84-
85-
- name: Login to new ECR
86-
if: steps.aws_new.outcome == 'success'
87-
uses: aws-actions/amazon-ecr-login@4625ce35226a7557230889aae2f52eb50ec3dcda # v2.0.1
88-
8964
- name: Set up Docker Buildx
9065
if: steps.tag_exists.outputs.exists == 'false'
9166
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
9267

93-
- name: Build and push runner image to both ECRs
68+
- name: Build and push runner image
9469
if: steps.tag_exists.outputs.exists == 'false'
9570
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
9671
with:
@@ -100,7 +75,6 @@ jobs:
10075
ssh: default
10176
tags: |
10277
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
103-
${{ env.NEW_ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
10478
10579
- name: Print image reference + digest
10680
run: |

0 commit comments

Comments
 (0)