-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
48 lines (45 loc) · 1.5 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: AWS Auth helpers
description: AWS Auth helpers
author: Igor Suvorov
branding:
icon: upload
color: orange
inputs:
AWS_REGION:
description: AWS_REGION
required: true
AWS_OWNER:
description: AWS_OWNER
required: true
AWS_ACCESS_KEY_ID:
description: AWS_ACCESS_KEY_ID
required: true
AWS_SECRET_ACCESS_KEY:
description: AWS_SECRET_ACCESS_KEY
required: true
AWS_CODEARTIFACT_REPOSITORY:
description: AWS_CODEARTIFACT_REPOSITORY
required: true
AWS_CODEARTIFACT_DOMAIN:
description: AWS_CODEARTIFACT_DOMAIN
required: true
# AWS_DOCKER_REPOSITORY:
# description: AWS_DOCKER_REPOSITORY
# required: true
runs:
using: composite
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ inputs.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
run: |
aws ecr get-login-password --region ${{ inputs.AWS_REGION }} | docker login --username AWS --password-stdin ${{ inputs.AWS_OWNER }}.dkr.ecr.${{ inputs.AWS_REGION }}.amazonaws.com
shell: bash
- name: Login to Amazon CodeArtifact NPM
run: aws codeartifact login --tool npm --repository ${{ inputs.AWS_CODEARTIFACT_REPOSITORY }} --domain ${{ inputs.AWS_CODEARTIFACT_DOMAIN }} --domain-owner ${{ inputs.AWS_OWNER }} --region ${{ inputs.AWS_REGION }}
shell: bash