Skip to content

Commit

Permalink
testing the population of folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sayaliM0412 authored Jan 29, 2025
1 parent cbf56c3 commit 42c9352
Showing 1 changed file with 62 additions and 62 deletions.
124 changes: 62 additions & 62 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
required: false

jobs:
# wait-for-fossa-report-generation:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# repo: [
# { name: "DaticalDB-installer", ref: "master",owner: "Datical" },
wait-for-fossa-report-generation:
runs-on: ubuntu-latest
strategy:
matrix:
repo: [
{ name: "DaticalDB-installer", ref: "master",owner: "Datical" }
# {name: "ephemeral-database", ref: "master",owner: "liquibase"},
# { name: "drivers", ref: "master",owner: "Datical" },
# {name: "protoclub", ref: "develop",owner: "Datical"},
Expand All @@ -24,63 +24,63 @@ jobs:
# { name: "liquibase-bundle", ref: "master",owner: "Datical" },
# { name: "liquibase", ref: "ddb",owner: "Datical" },
# { name: "ephemeral-database", ref: "master",owner: "Liquibase" }
# ]
]

# name: "${{ matrix.repo.name }} - Fossa Report"
# steps:
# - name: Set workflow inputs
# run: |
# if [[ "${{ matrix.repo.name }}" ]]; then
# echo "WORKFLOW_INPUTS={ \"version_number_for_report_generation\": \"${{ github.event.inputs.version_number_for_report_generation }}\" }" >> $GITHUB_ENV
# else
# echo "WORKFLOW_INPUTS={}" >> $GITHUB_ENV
# fi

# - name: Dispatch an action and get the run ID
# uses: codex-/return-dispatch@v1
# id: return_dispatch
# continue-on-error: true
# with:
# token: ${{ secrets.FOSSA_TRIGGER_REPORT_GENERATION }}
# ref: ${{ matrix.repo.ref }}
# repo: ${{ matrix.repo.name }}
# owner: ${{ matrix.repo.owner }}
# workflow: fossa.yml
# workflow_inputs: ${{ env.WORKFLOW_INPUTS }}

# - name: Retry fetching run ID (max 4 attempts with 5 seconds delay)
# run: |
# retries=7
# delay=5 # Delay of 5 seconds between retries
# for i in $(seq 1 $retries); do
# run_id="${{ steps.return_dispatch.outputs.run_id }}"
# if [ -n "$run_id" ]; then
# echo "Found run ID: $run_id"
# echo "run_id=$run_id" >> $GITHUB_ENV
# break
# else
# echo "Run ID not found, retrying in $delay seconds..."
# fi

# if [ $i -eq $retries ]; then
# echo "Failed to get run ID after $retries attempts."
# exit 1
# fi

# # Wait before retrying
# sleep $delay
# done
# shell: bash

# - name: Await Run ID ${{ steps.return_dispatch.outputs.run_id }}
# uses: Codex-/await-remote-run@v1
# with:
# token: ${{ secrets.FOSSA_TRIGGER_REPORT_GENERATION }}
# run_id: ${{ steps.return_dispatch.outputs.run_id }}
# repo: ${{ matrix.repo.name }}
# owner: ${{ matrix.repo.owner }}
# run_timeout_seconds: 420 # 7 minutes Time until giving up on the run
# poll_interval_ms: 120000 # 2 minutes Frequency to poll the run for a status.
name: "${{ matrix.repo.name }} - Fossa Report"
steps:
- name: Set workflow inputs
run: |
if [[ "${{ matrix.repo.name }}" ]]; then
echo "WORKFLOW_INPUTS={ \"version_number_for_report_generation\": \"${{ github.event.inputs.version_number_for_report_generation }}\" }" >> $GITHUB_ENV
else
echo "WORKFLOW_INPUTS={}" >> $GITHUB_ENV
fi
- name: Dispatch an action and get the run ID
uses: codex-/return-dispatch@v1
id: return_dispatch
continue-on-error: true
with:
token: ${{ secrets.FOSSA_TRIGGER_REPORT_GENERATION }}
ref: ${{ matrix.repo.ref }}
repo: ${{ matrix.repo.name }}
owner: ${{ matrix.repo.owner }}
workflow: fossa.yml
workflow_inputs: ${{ env.WORKFLOW_INPUTS }}

- name: Retry fetching run ID (max 4 attempts with 5 seconds delay)
run: |
retries=7
delay=5 # Delay of 5 seconds between retries
for i in $(seq 1 $retries); do
run_id="${{ steps.return_dispatch.outputs.run_id }}"
if [ -n "$run_id" ]; then
echo "Found run ID: $run_id"
echo "run_id=$run_id" >> $GITHUB_ENV
break
else
echo "Run ID not found, retrying in $delay seconds..."
fi
if [ $i -eq $retries ]; then
echo "Failed to get run ID after $retries attempts."
exit 1
fi
# Wait before retrying
sleep $delay
done
shell: bash

- name: Await Run ID ${{ steps.return_dispatch.outputs.run_id }}
uses: Codex-/await-remote-run@v1
with:
token: ${{ secrets.FOSSA_TRIGGER_REPORT_GENERATION }}
run_id: ${{ steps.return_dispatch.outputs.run_id }}
repo: ${{ matrix.repo.name }}
owner: ${{ matrix.repo.owner }}
run_timeout_seconds: 420 # 7 minutes Time until giving up on the run
poll_interval_ms: 120000 # 2 minutes Frequency to poll the run for a status.


# combine-fossa-reports:
Expand Down

0 comments on commit 42c9352

Please sign in to comment.