Skip to content

Commit

Permalink
fix: Removed creds.json
Browse files Browse the repository at this point in the history
Ensured secure removal of creds.json from .github/workflows.
  • Loading branch information
JayanaGunaweera01 committed Aug 30, 2023
1 parent ebda6fd commit c08b453
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/migration-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json


- name: Persist Logs
run: |
Expand Down Expand Up @@ -146,6 +149,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json


- name: Persist Logs
run: |
Expand Down Expand Up @@ -202,6 +208,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json

- name: Persist Logs
run: |
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
Expand Down Expand Up @@ -229,6 +238,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json

- name: Persist Logs
run: |
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
Expand Down Expand Up @@ -278,6 +290,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json

- name: Persist Logs
run: |
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
Expand Down Expand Up @@ -328,6 +343,9 @@ jobs:
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Remove creds.json file
run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json

- name: Persist Logs
run: |
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
Expand Down

0 comments on commit c08b453

Please sign in to comment.