Skip to content

Commit 1b546f1

Browse files
Plan production on PR, rename some workflows
1 parent a3f6c46 commit 1b546f1

File tree

6 files changed

+61
-24
lines changed

6 files changed

+61
-24
lines changed

.github/workflows/draft-release.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Plan Production Environment
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
branches: [ "**" ]
7+
8+
jobs:
9+
get-tg-versions:
10+
permissions:
11+
contents: read
12+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.2.0
13+
14+
build-matrix:
15+
permissions:
16+
contents: read
17+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.2.0
18+
with:
19+
platform_environment: production
20+
21+
call-terragrunt-plan:
22+
needs: [get-tg-versions, build-matrix]
23+
permissions:
24+
contents: read
25+
id-token: write
26+
strategy:
27+
fail-fast: false
28+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
29+
30+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-plan-only.yml@feature/plan-only-workflow
31+
with:
32+
git_branch: ${{ github.head_ref }}
33+
tf_version: ${{ needs.get-tg-versions.outputs.tf_version }}
34+
tg_version: ${{ needs.get-tg-versions.outputs.tg_version }}
35+
region: ${{ matrix.terragrunt_environment.region }}
36+
env_id: ${{ matrix.terragrunt_environment.instance }}
37+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Draft Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
draft-release:
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5
19+
with:
20+
commitish: main
21+
latest: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-published.yml renamed to .github/workflows/release-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-deploy.yml@0.2.0
3131
with:
32-
git_branch: ${{ github.head_ref }}
32+
git_branch: ${{ github.ref }}
3333
tf_version: ${{ needs.get-tg-versions.outputs.tf_version }}
3434
tg_version: ${{ needs.get-tg-versions.outputs.tg_version }}
3535
environment: ${{ matrix.terragrunt_environment.environment }}

0 commit comments

Comments
 (0)