Skip to content

Commit 2f61383

Browse files
authored
Fix: actions deployment (#259)
* fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment * fix: actions deployment
1 parent dafd566 commit 2f61383

2 files changed

Lines changed: 26 additions & 15 deletions

File tree

.github/workflows/build-deploy-prod.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
name: Build & Deploy PROD
55

66
on:
7-
push:
8-
tags:
9-
- 'v*'
10-
workflow_dispatch:
7+
workflow_call:
8+
inputs:
9+
tag:
10+
required: true
11+
type: string
1112

1213
env:
1314
AWS_REGION: ${{ secrets.AWS_REGION }}
@@ -21,9 +22,10 @@ jobs:
2122
build:
2223
name: build_deploy_prod
2324
runs-on: ubuntu-latest
25+
2426
permissions:
25-
id-token: write
26-
contents: write
27+
contents: read
28+
id-token: write
2729

2830
steps:
2931
# download the source code into the runner
@@ -39,6 +41,7 @@ jobs:
3941
with:
4042
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github-actions-role
4143
aws-region: ${{ env.AWS_REGION }}
44+
role-session-name: GithubActions
4245

4346
# gather metadata from git & github actions to reference in docker
4447
- name: git & github metadata
@@ -70,4 +73,3 @@ jobs:
7073
service: ${{ env.ECS_SERVICE }}
7174
cluster: ${{ env.ECS_CLUSTER }}
7275
wait-for-service-stability: true
73-

.github/workflows/release.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
# Copyright 2020 ChainSafe Systems
2-
# SPDX-License-Identifier: LGPL-3.0-only
3-
4-
name: Release
2+
# SPDX-License-Identifier: LGPL-3.0-only
3+
name: Deploy Release
54
on:
65
push:
76
branches:
8-
- main
9-
7+
- main
108
jobs:
11-
release-please:
9+
release:
10+
permissions: write-all
1211
runs-on: ubuntu-latest
12+
outputs:
13+
release_created: ${{ steps.release.outputs.release_created }}
14+
tag: ${{ steps.release.outputs.tag_name }}
1315
steps:
1416
- uses: GoogleCloudPlatform/release-please-action@v3.1
15-
id: release
17+
id: release
1618
with:
1719
release-type: go
18-
20+
token: ${{secrets.GITHUB_TOKEN}}
21+
22+
deploy-services:
23+
needs: release
24+
uses: ChainSafe/nodewatch-api/.github/workflows/build-deploy-prod.yml@main
25+
if: ${{ needs.release.outputs.release_created }}
26+
with:
27+
tag: ${{ needs.release.outputs.tag }}

0 commit comments

Comments
 (0)