Skip to content

Commit

Permalink
[OB] Build and push to outerbounds ECR
Browse files Browse the repository at this point in the history
  • Loading branch information
josephsirak committed Jan 17, 2025
1 parent 05c5626 commit b7446d7
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ on:
branches:
- master
- dev-*
- release-*

defaults:
run:
shell: bash

permissions:
contents: read
id-token: write

jobs:
build-binaries:
runs-on: ubuntu-20.04
if: github.repository == 'argoproj/argo-events'
if: github.repository == 'outerbounds/argo-events'
name: Build binaries
steps:
- name: Checkout
Expand All @@ -27,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version: "1.22"

- name: Build binaries
run: |
Expand All @@ -45,41 +47,42 @@ jobs:
name: Build & push linux/amd64 and linux/arm64
needs: [ build-binaries ]
runs-on: ubuntu-20.04
if: github.repository == 'argoproj/argo-events'
if: github.repository == 'outerbounds/argo-events'
strategy:
matrix:
target: [ argo-events ]
env:
ECR_REGISTRY: 006988687827.dkr.ecr.us-west-2.amazonaws.com
IMAGE_NAME: obp-argo-events
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download binaries
uses: actions/download-artifact@v3
- name: Generate build ID
id: prep
run: |
branch=${GITHUB_REF##*/}
sha=${GITHUB_SHA::8}
ts=$(date +%s)
release_tag=$(git describe --tags --exact-match --match 'v*' || echo "dirty")
echo "BUILD_ID=${branch}-${sha}-${ts}" >> $GITHUB_ENV
echo "RELEASE_BRANCH=${branch}" >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
name: binaries
path: dist/
role-to-assume: arn:aws:iam::006988687827:role/obp-argo-events-image-pusher
aws-region: us-west-2

- name: Registry Login
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
- run: aws sts get-caller-identity

- name: set Version
id: version
run: |
tag=$(basename $GITHUB_REF)
if [ $tag = "master" ]; then
tag="latest"
fi
echo "VERSION=$tag" >> $GITHUB_OUTPUT
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: ${{ env.ECR_REGISTRY }}

- name: Container build and push with arm64/amd64
- name: Build and push Docker image
run: |
IMAGE_NAMESPACE=${{ secrets.QUAYIO_ORG }} VERSION=${{ steps.version.outputs.VERSION }} DOCKER_PUSH=true make image-multi
IMAGE_NAMESPACE=${{ env.ECR_REGISTRY }} BINARY_NAME="${{ env.IMAGE_NAME }} VERSION=${{ env.RELEASE_BRANCH }} DOCKER_PUSH=true make image-multi
bom:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b7446d7

Please sign in to comment.