Skip to content

Commit 0648c64

Browse files
author
rahul-infra
committed
fix: using temperory Pr
1 parent 8ec5cf1 commit 0648c64

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/workflows/terraform-checks.yaml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,29 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.pull_request.head.ref }}
17+
18+
- name: Temporarily merge PR branch
19+
if: ${{ github.event_name == 'pull_request' }}
20+
run: |
21+
git config --global user.name github-actions
22+
git config --global user.email [email protected]
23+
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} --message "${{ github.event.pull_request.title }}"
1924
20-
- name: Release
21-
uses: cycjimmy/semantic-release-action@v2
25+
- name: Semantic Release
26+
id: semantic-release
27+
uses: cycjimmy/semantic-release-action@v6
2228
with:
23-
semantic_version: 18.0.0
24-
extra_plugins: |
25-
@semantic-release/[email protected]
26-
@semantic-release/[email protected]
27-
28-
dry_run: true
29+
unset_gha_env: ${{ github.event_name == 'pull_request' }}
30+
ci: ${{ github.event_name == 'pull_request' && false || '' }}
2931
env:
3032
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3133

34+
- name: Show version preview output
35+
if: ${{ github.event_name == 'pull_request' }}
36+
run: |
37+
echo "Version Preview: ${{ steps.semantic-release.outputs.new_release_version || 'No new version' }}"
38+
echo "Previous Version: ${{ steps.semantic-release.outputs.last_release_version || 'No previous version' }}"
39+
3240
test:
3341
name: Test
3442
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)