Skip to content

Commit

Permalink
ci(feat): Add catch-up workflow for copying release to ecr public
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Apr 20, 2023
1 parent afd8fda commit 3f27819
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/copy-releases-to-ecr-public.yml
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 }}

0 comments on commit 3f27819

Please sign in to comment.