Skip to content

Commit 8c4b026

Browse files
committed
Combined workflow into single file release.yml
1 parent a4a4062 commit 8c4b026

File tree

2 files changed

+31
-35
lines changed

2 files changed

+31
-35
lines changed

.github/workflows/amazon-ecr.yml

-32
This file was deleted.

.github/workflows/release.yml

+31-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Publish
22

33
on:
4-
workflow_dispatch:
54
push:
6-
tags:
7-
- 'v*.*.*'
5+
branches:
6+
- main
7+
permissions:
8+
id-token: write
9+
contents: read
10+
env:
11+
REPOSITORY_NAME: cryptgeon
812

913
jobs:
1014
cli:
@@ -56,3 +60,27 @@ jobs:
5660
platforms: linux/amd64,linux/arm64
5761
push: true
5862
tags: ${{ steps.meta.outputs.tags }}
63+
64+
AWS:
65+
name: AWS ECR public
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v2
70+
71+
- name: Configure AWS credentials
72+
uses: aws-actions/configure-aws-credentials@v1
73+
with:
74+
role-to-assume: ${{ secrets.AWS_ARN }}
75+
aws-region: ap-south-1
76+
77+
- name: Login to Amazon ECR
78+
id: login-ecr
79+
uses: aws-actions/amazon-ecr-login@v1
80+
81+
- name: Build, tag, and push the image to Amazon ECR
82+
id: build-image
83+
run: |
84+
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/r9h8b0z6
85+
docker build -t public.ecr.aws/r9h8b0z6/cryptgeon:latest .
86+
docker push public.ecr.aws/r9h8b0z6/cryptgeon:latest

0 commit comments

Comments
 (0)