-
Notifications
You must be signed in to change notification settings - Fork 107
Develop #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.2.0.1
Are you sure you want to change the base?
Develop #222
Changes from 250 commits
c402430
b88cd0c
fd0a34a
fe19259
30915d0
9b4e7c6
794e499
8bc8f82
51c2b7c
16fa0cb
92d0483
989c7b5
42eb0ad
18a4925
087a8a1
83aa54a
c47d403
f02cfa9
0433e27
d225b6d
1192006
be9ce61
0d6ccf4
4dddf21
1590a8b
6a8b33f
901a41b
05102af
3b16e06
286237b
9a1012e
335ba0a
799d092
06666c4
e75a408
da85459
a2eb990
ab9ab3b
061a247
b019ec6
784222b
f58c3ae
62a5884
ae305f7
98a0393
f3722e0
41be44b
1c0889a
fff9e9d
fb37615
04ddc9b
a7761f5
17b7436
83d5ca7
458e0d4
3b83a50
39992f4
9d75c37
1ecb235
f887d40
1072646
790f2f6
7c2af98
907bd6b
202b62b
971eef9
9f1aaab
a161c85
f8a3639
b150f0d
1df435a
ca9e54d
fd351bc
50f3a88
5f6b37b
7726eb4
29a6106
a4fe9bf
3672ba1
0a38c7f
9f639e5
af64a15
cdd2247
527f6fe
b77129a
485b6df
3d8c6d7
0e5ccff
3b5da67
231c356
2de9da1
ca41682
029925f
19a70af
a4b6a6b
d8db540
4fb3402
66bae35
8422c24
f0b1b8b
ac95e36
a7fbbf6
57d84e1
e03da3d
051dfbc
f155d0a
8b587f8
621c15a
4492e61
f753f96
6452bae
2f986ae
2bca234
996cba1
cfeb72f
ac688cb
624ab61
537e697
0bffae1
2a5f715
2d25d33
dee6ad0
658ed0f
55d67a9
0876b95
1f11dca
779e58b
184f3f5
a0fcb94
7709477
3e07e24
a972d74
59a86e2
b93f787
2592b25
399a6b2
f18be9a
9b60eca
969e481
dda94a0
83e0b7d
b191cf4
61233e3
3eb0f3d
e579bb6
aabdba0
6c850f5
d73a980
1ce7391
016171e
d55a5fe
73bd9f4
471e01d
6280cc9
7ed1429
9f1e1e8
9c0b0eb
c190535
ec551c1
2398b89
1883c10
d445773
3000dc1
5461d23
dffb18b
480d388
f7ba130
8540113
7796168
f98a703
3a05f26
4f92e17
acc24fb
f63a04c
ee79466
304af91
41c9a56
29d1860
f6a27a8
dc3c43f
19ebe4d
4e2cad3
93f5ba6
919ce76
87c3a31
85fccbb
494d709
076d552
99223f6
cc9b97e
d23636d
6bd4643
ab55fd4
64671be
15dd27e
3e09df5
b3a85a9
8157dc7
b50c64d
ba86bba
bef9b71
6b2bcb0
60975de
c0e65d8
19a7ef9
ad4f1b3
157314b
8164920
3baefaf
f7075c0
6417dd2
1d8e8ca
c39f9ec
9b3d84b
968267d
b0d5e7f
6de6b76
1541b61
037764d
395de2f
322100b
aa7e367
673249c
e5a2032
53a7892
cd3e846
dcedef0
04b000f
66d4143
489bb61
5e87808
ed265c1
236989c
eaa739e
148ac23
58f5d5a
db76fb7
9cb2e23
2f66628
22e6bc1
08db638
b1634f9
02eceda
be1a0b3
9077fbc
d76514f
39455d5
863d68c
b053ee1
4adf16e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: Setup Postgresql & Run postgres_init for MOSIP_Master & Run docker container | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| workflow_dispatch: | ||
| inputs: | ||
| message: | ||
| description: 'Message for manually triggering' | ||
| required: false | ||
| default: 'Triggered for Updates' | ||
| type: string | ||
| push: | ||
| branches: | ||
| - develop | ||
| - 1.2.0.1 | ||
| - MOSIP* | ||
| env: | ||
| DBUSER_PWD: mosip123 | ||
| SU_USER_PWD: abc123 | ||
| jobs: | ||
| setup-and-run: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v2 | ||
| - name: Create Docker Network | ||
| run: docker network create mosip_network | ||
| - name: Setup PostgreSQL Container | ||
| run: | | ||
| docker run -d \ | ||
| --name postgresql \ | ||
| --network mosip_network \ | ||
| -p 5432:5432 \ | ||
| -e POSTGRES_USER=postgres \ | ||
| -e POSTGRES_PASSWORD=${{ env.SU_USER_PWD }} \ | ||
| -e POSTGRES_HOST_AUTH_METHOD=trust \ | ||
| postgres:16 | ||
| - name: Initialise mosip_master DB | ||
| run: | | ||
| docker run -itd \ | ||
| --name mosip_master_container \ | ||
| --network mosip_network \ | ||
| -e MOSIP_DB_NAME=mosip_master \ | ||
| -e DB_SERVERIP=postgresql \ | ||
| -e DB_PORT=5432 \ | ||
| -e SU_USER=postgres \ | ||
| -e DML_FLAG=1 \ | ||
| -e GIT_REPO_URL=https://github.com/mosip/admin-services.git \ | ||
| -e GIT_BRANCH=develop \ | ||
| -e SU_USER_PWD=${{ env.SU_USER_PWD }} \ | ||
| -e DBUSER_PWD=${{ env.DBUSER_PWD }} \ | ||
| mosipdev/postgres-init:develop | ||
|
|
||
| - name: docker ps command | ||
| run: docker ps -a | ||
| - name: Print Logs of mosip_master | ||
| run: | | ||
| # Display mosip_master_container logs | ||
| docker logs -f mosip_master_container | ||
|
|
||
| - name: Check whether db_init has errors in Logs | ||
| run: | | ||
| if docker logs mosip_master_container | grep -qi "error"; then | ||
| echo "Error found in mosip_master_container logs." | ||
| exit 1 | ||
| else | ||
| echo "No errors found in mosip_master_container logs." | ||
| fi | ||
|
|
||
|
|
||
| - name: Set environment variables | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "pull_request" ]; then | ||
| REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}" | ||
| BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
| else | ||
| REPO_URL="https://github.com/${{ github.repository }}.git" | ||
| BRANCH_NAME="${{ github.ref_name }}" | ||
| fi | ||
| echo "REPO_URL=${REPO_URL}" >> $GITHUB_ENV | ||
| echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV | ||
|
|
||
| - name: Run masterdata-loader | ||
| run: | | ||
| docker run -itd \ | ||
| --name masterdata_loader \ | ||
| --network mosip_network \ | ||
| -e DB_HOST=postgresql \ | ||
| -e DB_USER=masteruser \ | ||
| -e DB_PORT=5432 \ | ||
| -e DB_PWD=${{ env.DBUSER_PWD }} \ | ||
| -e REPOSITORY=${{ env.REPO_URL }}\ | ||
| -e BRANCH=${{ env.BRANCH_NAME }} \ | ||
| mosipdev/masterdata-loader:develop | ||
|
|
||
| - name: docker ps command | ||
| run: docker ps -a | ||
| - name: Print Logs of masterdata_loader | ||
| run: | | ||
| # Display masterdata_loader logs | ||
| docker logs -f masterdata_loader | ||
|
|
||
| - name: Check whether masterdata_loader has errors in Logs | ||
| run: | | ||
| if docker logs masterdata_loader | grep -qi "error"; then | ||
| echo "Error found in masterdata_loader logs." | ||
| exit 1 | ||
| else | ||
| echo "No errors found in masterdata_loader logs." | ||
| fi | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: xlsx to csv conversion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request_target: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [opened, reopened, synchronize] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: 'Message for manually triggering' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: 'Triggered for Updates' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| convert_xlsx_to_csv: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Clone the repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git clone -b ${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check failureCode scanning / CodeQL Code injection Critical
Potential code injection in
${ github.event.pull_request.head.ref } Error loading related location Loading pull_request_target Error loading related location Loading
Copilot AutofixAI 3 months ago Use GitHub Actions’ safe pattern for untrusted input in
Best minimal fix in
This preserves behavior while preventing expression-time injection in shell script text.
Suggested changeset
1
.github/workflows/xlsx-to-csv.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Get author email | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PR_NUMBER=${{ github.event.number }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| commits=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -H "Accept: application/vnd.github.v3+json" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/commits") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| email=$(echo "$commits" | jq -r '.[0].commit.author.email // "${{ github.event.pull_request.user.login }}@users.noreply.github.com"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "author_email=$email" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set up Git identity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config --global user.name "${{ github.event.pull_request.user.login }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config --global user.email "${{ env.author_email }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install xlsx2csv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: sudo apt-get install -y xlsx2csv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create output directory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf mosip-data/mosip_master_csv/csv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p mosip-data/mosip_master_csv/csv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Convert all XLSX to CSV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for xlsx_file in mosip-data/mosip_master/xlsx/*.xlsx; do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| csv_file="mosip-data/mosip_master_csv/csv/$(basename "${xlsx_file%.xlsx}.csv")" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xlsx2csv "$xlsx_file" > "$csv_file" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Converted $xlsx_file to $csv_file" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Commit and push changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd mosip-data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git branch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git add . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git commit -s -m "Added converted CSV files" || echo "No changes to commit" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.event.pull_request.head.ref }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check failureCode scanning / CodeQL Code injection Critical
Potential code injection in
${ github.event.pull_request.head.ref } Error loading related location Loading pull_request_target Error loading related location Loading
Copilot AutofixAI 3 months ago Use GitHub’s recommended safe pattern: assign untrusted context values to environment variables in the step, then reference them via shell variables (e.g.,
This keeps functionality unchanged while removing direct expression interpolation from the shell command and properly quoting the refspec argument.
Suggested changeset
1
.github/workflows/xlsx-to-csv.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
Comment on lines
+15
to
+80
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 3 months ago Add an explicit Best minimal, non-functional-change fix:
This preserves existing behavior because writes are done through
Suggested changeset
1
.github/workflows/xlsx-to-csv.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| .DS_Store | ||
| .idea | ||
| .project |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| THIRD-PARTY NOTICES | ||
|
|
||
| Copyright © MOSIP. | ||
| All rights reserved. | ||
|
|
||
| This project includes third-party components distributed under licenses | ||
| that require attribution. The following sections list those components | ||
| and their respective licenses. | ||
|
|
||
| =========================== | ||
| Mozilla Public License 2.0 | ||
| ========================== | ||
|
|
||
| • MOSIP Data (mosip-data) | ||
| Version: release-1.3.x | ||
| Homepage: [https://github.com/Rakshithasai123/mosip-data](https://github.com/Rakshithasai123/mosip-data) | ||
|
|
||
| =========================== | ||
| MIT License | ||
| =========== | ||
|
|
||
| • actions/checkout | ||
| Version: 2.*.* | ||
| Homepage: [https://github.com/actions/checkout](https://github.com/actions/checkout) | ||
|
|
||
| --- | ||
|
|
||
| Full license texts for all components are available in the | ||
| `license/` directory of this repository. | ||
| ---------------------------------------- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ,techno-243,gagana26,28.04.2022 14:44,file:///home/techno-243/.config/libreoffice/4; |
Uh oh!
There was an error while loading. Please reload this page.