Skip to content

Commit

Permalink
Merge pull request #197 from bosonprotocol/container-build
Browse files Browse the repository at this point in the history
Fix ECR login
  • Loading branch information
Radu Stefanache authored Jan 5, 2022
2 parents 914c462 + 5d0da26 commit fd5e138
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- name: Login to Amazon ECR
- id: install-aws-cli
if: ${{ github.event_name == 'push' }}
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: unfor19/install-aws-cli-action@v1
with:
version: 2
- name: ECR login
if: ${{ github.event_name == 'push' }}
run: aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
- name: Export TAG value
if: ${{ github.event_name == 'push' }}
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
Expand Down Expand Up @@ -81,10 +85,14 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- name: Login to Amazon ECR
- id: install-aws-cli
if: ${{ github.event_name == 'push' }}
uses: unfor19/install-aws-cli-action@v1
with:
version: 2
- name: ECR login
if: ${{ github.event_name == 'push' }}
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
run: aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
- name: Export TAG value
if: ${{ github.event_name == 'push' }}
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update \
&& apt-get -y install python3 curl unzip \
&& cd /tmp \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& unzip -q awscliv2.zip \
&& ./aws/install \
&& rm awscliv2.zip \
&& rm -rf aws
Expand Down
2 changes: 1 addition & 1 deletion external/keepers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update \
&& apt-get -y install python3 curl unzip \
&& cd /tmp \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& unzip -q awscliv2.zip \
&& ./aws/install \
&& rm awscliv2.zip \
&& rm -rf aws
Expand Down

0 comments on commit fd5e138

Please sign in to comment.