Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
name: Build & Deploy PROD

on:
push:
tags:
- 'v*'
workflow_dispatch:
workflow_call:
inputs:
tag:
required: true
type: string

env:
AWS_REGION: ${{ secrets.AWS_REGION }}
Expand All @@ -21,9 +22,10 @@ jobs:
build:
name: build_deploy_prod
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write
contents: read
id-token: write

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

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

25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# Copyright 2020 ChainSafe Systems
# SPDX-License-Identifier: LGPL-3.0-only

name: Release
# SPDX-License-Identifier: LGPL-3.0-only
name: Deploy Release
on:
push:
branches:
- main

- main
jobs:
release-please:
release:
permissions: write-all
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag: ${{ steps.release.outputs.tag_name }}
steps:
- uses: GoogleCloudPlatform/[email protected]
id: release
id: release
with:
release-type: go

token: ${{secrets.GITHUB_TOKEN}}

deploy-services:
needs: release
uses: ChainSafe/nodewatch-api/.github/workflows/build-deploy-prod.yml@main
if: ${{ needs.release.outputs.release_created }}
with:
tag: ${{ needs.release.outputs.tag }}