Skip to content

Commit 73353cb

Browse files
authored
Update release.yml (#162)
* Update release.yml * Update release.yml * Update release.yml fix unrecognized variables * Update release.yml fix empty version * Update release.yml * Update release.yml
1 parent 09d6208 commit 73353cb

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
78
env:
89
AWS_REGION: us-west-2
910

@@ -19,15 +20,6 @@ jobs:
1920
- name: Set up QEMU
2021
uses: docker/setup-qemu-action@v2
2122

22-
- name: Docker meta
23-
id: meta
24-
uses: docker/metadata-action@v3
25-
with:
26-
images: |
27-
scrolltech/rollup-explorer-backend
28-
tags: |
29-
type=semver,pattern={{version}}
30-
3123
- name: Set up Docker Buildx
3224
uses: docker/setup-buildx-action@v2
3325

@@ -37,20 +29,6 @@ jobs:
3729
username: ${{ secrets.DOCKERHUB_USERNAME }}
3830
password: ${{ secrets.DOCKERHUB_TOKEN }}
3931

40-
- name: Login to Github
41-
uses: docker/login-action@v2
42-
with:
43-
registry: ghcr.io
44-
username: ${{ secrets.PAT_OWNER }}
45-
password: ${{ secrets.PAT_TOKEN }}
46-
47-
- name: Build image
48-
id: build
49-
uses: docker/build-push-action@v3
50-
with:
51-
push: true
52-
tags: ${{ steps.meta.outputs.tags }}
53-
5432
# build and push to aws ecr
5533
- name: Configure AWS credentials
5634
uses: aws-actions/configure-aws-credentials@v4
@@ -63,14 +41,17 @@ jobs:
6341
id: login-ecr
6442
uses: aws-actions/amazon-ecr-login@v2
6543

66-
- name: Build, tag, and push image to Amazon ECR
67-
id: build-image
44+
- name: Build image
45+
id: build
6846
env:
6947
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
7048
ECR_REPOSITORY: rollup-explorer-backend
71-
IMAGE_TAG: ${{github.ref_name}}
72-
run: |
73-
# Build a docker container and push it to ECR
74-
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
75-
docker tag scrolltech/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
76-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
49+
IMAGE_TAG: ${{ github.ref_name }}
50+
uses: docker/build-push-action@v3
51+
with:
52+
push: true
53+
tags: |
54+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
55+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.ECR_REPOSITORY }}:latest
56+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
57+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest

0 commit comments

Comments
 (0)