From 1bfe739d67141bc13819e2c2a8dd57cd375aa79f Mon Sep 17 00:00:00 2001 From: felixll3 Date: Tue, 4 Aug 2026 17:39:48 +0800 Subject: [PATCH] Add workflow to mirror official lighthouse image to ECR --- .../workflows/sync-official-image-to-ecr.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/sync-official-image-to-ecr.yml diff --git a/.github/workflows/sync-official-image-to-ecr.yml b/.github/workflows/sync-official-image-to-ecr.yml new file mode 100644 index 00000000000..b93c2ae4956 --- /dev/null +++ b/.github/workflows/sync-official-image-to-ecr.yml @@ -0,0 +1,37 @@ +name: sync-official-image-to-ecr + +on: + workflow_dispatch: + inputs: + source_image: + description: 'Official image to mirror, e.g. sigp/lighthouse:v5.3.0' + required: true + default: 'sigp/lighthouse:latest' + ecr_tag: + description: 'Tag to push to 553885929720.dkr.ecr.us-east-1.amazonaws.com/lighthouse' + required: true + +jobs: + mirror: + runs-on: ubuntu-22.04 + steps: + - name: Pull official image + run: docker pull ${{ github.event.inputs.source_image }} + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Login to ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + + - name: Tag and push to ECR + run: | + TARGET="${{ steps.login-ecr.outputs.registry }}/lighthouse:${{ github.event.inputs.ecr_tag }}" + docker tag ${{ github.event.inputs.source_image }} "$TARGET" + docker push "$TARGET" + echo "Pushed $TARGET"