Skip to content

Commit 7caa71f

Browse files
authored
fix: Revert "fix: ecs fixed, release ci fixed" (#237)
* Revert "fix: ecs fixed, release ci fixed (#236)" This reverts commit 6da48aa. * Update task_definition_PROD.json
1 parent 6da48aa commit 7caa71f

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed
Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Copyright 2020 ChainSafe Systems
22
# SPDX-License-Identifier: LGPL-3.0-only
33

4-
name: Release
4+
name: Build & Deploy PROD
5+
56
on:
67
push:
7-
branches:
8-
- main
8+
tags:
9+
- 'v*'
10+
workflow_dispatch:
911

1012
env:
1113
AWS_REGION: ${{ secrets.AWS_REGION }}
@@ -14,48 +16,40 @@ env:
1416
ECS_CLUSTER: ${{ secrets.AWS_ECS_CLUSTER }}
1517
ECS_SERVICE: ${{ secrets.AWS_ECS_SERVICE }}
1618
ENVIRONMENT: PROD
17-
19+
1820
jobs:
19-
release-please:
21+
build:
22+
name: build_deploy_prod
2023
runs-on: ubuntu-latest
2124
permissions:
2225
id-token: write
2326
contents: write
2427

2528
steps:
26-
- uses: GoogleCloudPlatform/[email protected]
27-
id: release
28-
with:
29-
release-type: go
30-
29+
# download the source code into the runner
3130
- name: checkout
3231
uses: actions/checkout@v2
33-
if: ${{ steps.release.outputs.release_created }}
34-
32+
3533
- name: Set output
3634
id: vars
3735
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
38-
if: ${{ steps.release.outputs.release_created }}
39-
36+
4037
- name: Configure AWS credentials
4138
uses: aws-actions/configure-aws-credentials@v1
4239
with:
4340
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github-actions-role
4441
aws-region: ${{ env.AWS_REGION }}
45-
if: ${{ steps.release.outputs.release_created }}
4642

4743
# gather metadata from git & github actions to reference in docker
4844
- name: git & github metadata
4945
id: metadata
5046
uses: docker/metadata-action@v3
5147
with:
5248
images: ${{ env.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.AWS_ECR_REPO }}
53-
if: ${{ steps.release.outputs.release_created }}
5449

5550
# login in docker repository
5651
- name: docker login
5752
uses: aws-actions/amazon-ecr-login@v1
58-
if: ${{ steps.release.outputs.release_created }}
5953

6054
# build a docker image
6155
- name: docker & push image
@@ -67,8 +61,7 @@ jobs:
6761
tags: |
6862
${{ env.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.ECR_REPO }}:latest
6963
${{ env.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.ECR_REPO }}:${{ steps.vars.outputs.tag }}
70-
if: ${{ steps.release.outputs.release_created }}
71-
64+
7265
# deploy to AWS ECS
7366
- name: Deploy to Amazon ECS
7467
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
@@ -77,5 +70,4 @@ jobs:
7770
service: ${{ env.ECS_SERVICE }}
7871
cluster: ${{ env.ECS_CLUSTER }}
7972
wait-for-service-stability: true
80-
if: ${{ steps.release.outputs.release_created }}
81-
73+

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2020 ChainSafe Systems
2+
# SPDX-License-Identifier: LGPL-3.0-only
3+
4+
name: Release
5+
on:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
release-please:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: GoogleCloudPlatform/[email protected]
15+
id: release
16+
with:
17+
release-type: go
18+

infra/aws-ecs/task_definition_PROD.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": "Nodewatch"
100100
}
101101
]
102-
}
102+
}

0 commit comments

Comments
 (0)