Skip to content

Commit 0d1381d

Browse files
committed
update docker image github workflow
1 parent 9323893 commit 0d1381d

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,51 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/[email protected]
25+
2526
- name: Set up QEMU
2627
uses: docker/[email protected]
28+
2729
- name: Set up Docker Buildx
2830
uses: docker/[email protected]
31+
32+
# ------------------------
33+
# 1) Login to Docker Hub
34+
# ------------------------
2935
- name: Login to Docker Hub
3036
uses: docker/login-action@v3
3137
with:
3238
username: ${{ secrets.DOCKERHUB_USERNAME }}
3339
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
41+
# ---------------------------------------------
42+
# 2) Configure AWS Credentials for ECR Access
43+
# ---------------------------------------------
44+
- name: Configure AWS Credentials
45+
uses: aws-actions/configure-aws-credentials@v3
46+
with:
47+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
48+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
49+
aws-region: ${{ secrets.AWS_REGION }}
50+
51+
# ----------------------------------
52+
# 3) Login to Amazon ECR
53+
# ----------------------------------
54+
- name: Login to Amazon ECR
55+
uses: aws-actions/amazon-ecr-login@v1
56+
57+
# -------------------------
58+
# 4) Build and push images
59+
# -------------------------
3460
- name: Build and push
3561
uses: docker/[email protected]
3662
with:
3763
context: .
3864
file: ./docker/Dockerfile
3965
build-args: |
40-
NODE_VERSION=${{github.event.inputs.node_version}}
66+
NODE_VERSION=${{ github.event.inputs.node_version }}
4167
platforms: linux/amd64,linux/arm64
4268
push: true
43-
tags: flowiseai/flowise-bullmq:${{github.event.inputs.tag_version}}
69+
# Two tags: one for Docker Hub, one for ECR
70+
tags: |
71+
flowiseai/flowise-bullmq:${{ github.event.inputs.tag_version }}
72+
<aws_account_id>.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/flowise-bullmq:${{ github.event.inputs.tag_version }}

0 commit comments

Comments
 (0)