Skip to content

Commit

Permalink
Build and push to public.ecr.aws/e5r9m0c5
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardo-overhaul committed Jun 25, 2022
1 parent d563b4f commit 3fe1f55
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/build_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build homebrew image

on:
push:
tags:
- "v*"

permissions:
id-token: write # required to use OIDC authentication
contents: read

jobs:
build-and-push:
name: Build homebrew container and push to public ECR
runs-on: ubuntu-latest
steps:
- name: Get repo name
id: repoName
run: echo "::set-output name=reponame::$(echo ${{github.repository}} | cut -d '/' -f 2)"
- name: Get the version
id: get-version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::645843940509:role/github-actions-ecr-public-create-read-write
role-duration-seconds: 900 # Member must have value greater than or equal to 900
aws-region: us-east-1
# Using this until https://github.com/aws-actions/amazon-ecr-login/issues/116
# is closed
- name: Build and Push to ECR public
id: build-and-push
uses: pahud/ecr-public-action@0db8adbcfd3c3ec2f604d70fdd6b5d15c80e1dbc
with:
tags: |
public.ecr.aws/e5r9m0c5/${{ steps.repoName.outputs.reponame }}:${{ steps.get-version.outputs.VERSION }}

0 comments on commit 3fe1f55

Please sign in to comment.