Skip to content

Commit

Permalink
chore: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
samhamptonheycar committed Mar 22, 2024
1 parent 9b776b0 commit d6eb357
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
repository:
name: action=bootstrap
name: action-bootstrap
description: |
A Github action to perform common tasks for build pipelines.
topics: github, actions, ci, scripts, ecr, docker
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/test.yml

This file was deleted.

20 changes: 13 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ description: |
inputs:
ecr-repo-name:
required: true
role-to-assume:
required: true
role-session-name:
required: true
aws-region:
required: true
aws-account-id:
required: true

runs:
using: 'composite'
Expand All @@ -20,19 +28,17 @@ runs:
- name: Configure AWS credentials
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_OPS_GH_CI }}
role-session-name: ${{ secrets.AWS_OPS_SESSION_NAME }}
aws-region: ${{ secrets.AWS_OPS_DEFAULT_REGION }}
role-to-assume: ${{ inputs.role-to-assume }}
role-session-name: ${{ inputs.role-session-name }}
aws-region: ${{ inputs.aws-region }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Image Name
id: img-name
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "ecr-repo-name=${{secrets.AWS_OPS_ACCOUNT_ID}}.dkr.ecr.${{ secrets.AWS_OPS_DEFAULT_REGION }}.amazonaws.com/alpha-image/${{ env.ECR_REPO_NAME }}" >>"${GITHUB_OUTPUT}"
echo "ecr-repo-name=${{inputs.aws-account-id}}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/alpha-image/${{ inputs.ecr-repo-name }}" >>"${GITHUB_OUTPUT}"
else
echo "ecr-repo-name=${{secrets.AWS_OPS_ACCOUNT_ID}}.dkr.ecr.${{ secrets.AWS_OPS_DEFAULT_REGION }}.amazonaws.com/image/${{ env.ECR_REPO_NAME }}" >>"${GITHUB_OUTPUT}"
echo "ecr-repo-name=${{inputs.aws-account-id}}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/image/${{ inputs.ecr-repo-name }}" >>"${GITHUB_OUTPUT}"
fi
env:
ECR_REPO_NAME: ${{ inputs.ecr-repo-name }}

0 comments on commit d6eb357

Please sign in to comment.