Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BI-1102: Retag and push image to private ECR registry #98

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,29 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
push: ${{ ! startsWith(github.event_name, 'pull_request') }}

- name: Configure AWS credentials
if: ${{ ! startsWith(github.event_name, 'pull_request') }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'

- name: Login to Amazon ECR
if: ${{ ! startsWith(github.event_name, 'pull_request') }}
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Retag and push image to Amazon ECR
if: ${{ ! startsWith(github.event_name, 'pull_request') }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: production/azurehound
IMAGE_TAG: 'edge'
run: |
docker image tag ghcr.io/bloodhoundad/azurehound:edge $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

build:
runs-on: ubuntu-latest
defaults:
Expand Down
Loading