Skip to content

Commit b486bb3

Browse files
author
mike dupont
committed
merge 2 builds into one
1 parent 0ad2f6c commit b486bb3

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

.github/workflows/image.yaml

+21-29
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ jobs:
2929
steps:
3030

3131
# first we login
32+
- name: Configure AWS credentials
33+
uses: meta-introspector/configure-aws-credentials@v4
34+
with:
35+
aws-region: ${{ secrets.AWS_REGION || 'us-east-2'}}
36+
role-session-name: github-actions-${{ env.APP_NAME || 'eliza'}}
37+
# FIXME hard coded
38+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID || '767503528736' }}:role/github
39+
40+
- name: Login to Amazon ECR
41+
id: login-ecr
42+
uses: meta-introspector/amazon-ecr-login@v1
43+
44+
- name: Set short sha
45+
id: sha_short
46+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
47+
48+
3249
- name: Login to Docker Hub
3350
uses: meta-introspector/login-action@v3
3451
with:
@@ -80,35 +97,10 @@ jobs:
8097
https://api.github.com/user/packages/container/${{ env.IMAGE_NAME }}/visibility \
8198
-d '{"visibility":"public"}'
8299
83-
84-
- name: Build and push Docker images
85-
uses: meta-introspector/build-push-action@v6.10.0
86-
with:
87-
push: true
88-
tags: h4ckermike/elizaos-eliza:experimental
89-
90-
# push to ecr
91-
- name: Configure AWS credentials
92-
uses: meta-introspector/configure-aws-credentials@v4
93-
with:
94-
aws-region: ${{ secrets.AWS_REGION || 'us-east-2'}}
95-
role-session-name: github-actions-${{ env.APP_NAME || 'eliza'}}
96-
# FIXME hard coded
97-
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID || '767503528736' }}:role/github
98-
99-
- name: Login to Amazon ECR
100-
id: login-ecr
101-
uses: meta-introspector/amazon-ecr-login@v1
102-
103-
- name: Set short sha
104-
id: sha_short
105-
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
106-
107-
- name: Build and push ecr
100+
- name: Build and push images to Docker hub and ecr
108101
uses: meta-introspector/build-push-action@v6.10.0
109102
with:
110103
push: true
111-
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY || 'agent/eliza'}}:latest
112-
cache-from: type=gha
113-
cache-to: type=gha,mode=max
114-
provenance: false
104+
tags: |
105+
h4ckermike/elizaos-eliza:experimental
106+
${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY || 'agent/eliza'}}:latest

0 commit comments

Comments
 (0)