Skip to content

Commit

Permalink
add if for target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
0katrinpetrosyan0 committed Jun 10, 2022
1 parent 07d6fd7 commit effdbcd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/terraform/.github/workflows/master-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- project2
steps:
- name: Plan stage ${{ matrix.path }}
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
with:
post-plan-to-github-pr: 'false'
do-apply: 'true'
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/.github/workflows/master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- project2
steps:
- name: Publish stage terraform plan result into PR
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
with:
post-plan-to-github-pr: 'true'
fetch-depth: 100
Expand Down
9 changes: 5 additions & 4 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This action can be used as follows add latest version:

```yaml
- name: Publish terraform plan result into PR
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
```
## For Default Configuration in .github/workflows/check.yml you must have:
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Publish terraform plan result into PR
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -102,10 +102,11 @@ jobs:
- sample-path-to-terraform-project-sources
steps:
- name: Publish terraform plan result into PR
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
with:
fetch-depth: 100
post-plan-to-github-pr: 'true'
target_branch: "release"
path: terraform/${{ matrix.path }}
github-token: ${{ secrets.GITHUB_TOKEN }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
Expand Down Expand Up @@ -138,7 +139,7 @@ jobs:
- sample-path-to-terraform-project-sources
steps:
- name: Plan stage ${{ matrix.path }}
uses: dasmeta/reusable-actions-workflows/terraform@0.2.4
uses: dasmeta/reusable-actions-workflows/terraform@0.3.2
with:
post-plan-to-github-pr: 'false'
do-apply: 'true'
Expand Down
1 change: 1 addition & 0 deletions terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ runs:
fetch-depth: ${{ inputs.fetch-depth }}

- name: Merge branches
if: ${{inputs.target_branch}}
uses: devmasx/merge-branch@master
with:
type: now
Expand Down

0 comments on commit effdbcd

Please sign in to comment.