-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(feat): Add catch-up workflow for copying release to ecr public
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Copy releases to ecr public | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: What version would you like to use | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
copy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: linux/arm64,linux/amd64 | ||
- name: Set up Docker buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to docker hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to ghcr | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::726824350591:role/oidc-github-actions | ||
role-session-name: actions-push-to-ecr-public | ||
aws-region: us-east-1 | ||
|
||
- name: Login to AWS ECR | ||
id: login-ecr-public | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
with: | ||
registry-type: public | ||
env: | ||
AWS_DEFAULT_REGION: 'us-east-1' | ||
- name: Push image to ECR | ||
run: | | ||
docker buildx imagetools create \ | ||
--tag ${{ steps.login-ecr-public.outputs.registry }}/unleashorg/unleash-proxy:${{ github.event.inputs.version }} | ||
unleashorg/unleash-proxy:${{ github.event.inputs.version }} |