Skip to content

Commit 16e5206

Browse files
add automated steap to create github release and update ci for prs
1 parent baf47a3 commit 16e5206

File tree

3 files changed

+57
-4
lines changed

3 files changed

+57
-4
lines changed

.github/workflows/ci-workflow.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI Workflow
33
on:
44
push:
55
branches: [ main ]
6-
paths: &paths
6+
paths:
77
- 'gradle/**'
88
- '**.gradle'
99
- 'gradle.properties'
@@ -15,7 +15,16 @@ on:
1515
- '.github/workflows/ci-workflow.yml'
1616
pull_request:
1717
branches: [ main ]
18-
paths: *paths
18+
paths:
19+
- 'gradle/**'
20+
- '**.gradle'
21+
- 'gradle.properties'
22+
- 'app/**'
23+
- 'ft/**'
24+
- 'mocks/**'
25+
- 'docker-compose.yml'
26+
- 'lombok.config'
27+
- '.github/workflows/ci-workflow.yml'
1928

2029
workflow_dispatch:
2130
inputs:

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,31 @@ jobs:
100100
push: true
101101
tags: ${{ steps.meta.outputs.tags }}
102102
labels: ${{ steps.meta.outputs.labels }}
103+
104+
create-github-release:
105+
if: github.ref == 'refs/heads/main'
106+
needs: publish-docker-image
107+
runs-on: ubuntu-latest
108+
steps:
109+
- name: Checkout code
110+
uses: actions/checkout@v4
111+
112+
- name: Fetch tags
113+
run: git fetch --tags
114+
115+
- name: Get latest tag
116+
id: latest_tag
117+
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
118+
119+
- name: Log the version for release
120+
run: echo "The latest tag is ${{ env.LATEST_TAG }}"
121+
122+
- name: Checkout code at tag
123+
run: git checkout ${{ env.LATEST_TAG }}
124+
125+
- name: Create release
126+
uses: elgohr/Github-Release-Action@v5
127+
env:
128+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129+
with:
130+
title: ${{ env.LATEST_TAG }}

.github/workflows/sonarcloud-analyses.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,27 @@ on:
44
push:
55
branches: [ main ]
66
paths:
7-
- gateway-app/**
7+
- 'gradle/**'
8+
- '**.gradle'
9+
- 'gradle.properties'
10+
- 'app/**'
11+
- 'ft/**'
12+
- 'mocks/**'
13+
- 'docker-compose.yml'
14+
- 'lombok.config'
15+
- '.github/workflows/ci-workflow.yml'
816
pull_request:
917
branches: [ main ]
1018
paths:
11-
- gateway-app/**
19+
- 'gradle/**'
20+
- '**.gradle'
21+
- 'gradle.properties'
22+
- 'app/**'
23+
- 'ft/**'
24+
- 'mocks/**'
25+
- 'docker-compose.yml'
26+
- 'lombok.config'
27+
- '.github/workflows/ci-workflow.yml'
1228

1329
jobs:
1430
build-and-push:

0 commit comments

Comments
 (0)