From 52e893efa5dbafb21fc46146f3e69cbaa3455eea Mon Sep 17 00:00:00 2001 From: Aitor Viana Date: Wed, 15 Jan 2025 20:58:38 +0000 Subject: [PATCH] undo, for testing --- .github/workflows/release_report_error.yml | 57 ++++++++++++++-------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release_report_error.yml b/.github/workflows/release_report_error.yml index 75dde4ba14d3..66978f0d7dfc 100644 --- a/.github/workflows/release_report_error.yml +++ b/.github/workflows/release_report_error.yml @@ -1,27 +1,46 @@ name: Report Workflow Failed on: - workflow_dispatch: - -env: - ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + schedule: + - cron: "0 0 * * *" # Runs daily at midnight UTC + workflow_dispatch: # Allow manual triggering of the workflow jobs: - report-release-error: - name: Create Asana Task - runs-on: ubuntu-20.04 + analyze-reviews: + runs-on: ubuntu-latest steps: - - name: Create Asana task when workflow failed - uses: honeycombio/gha-create-asana-task@main + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r scripts/ps-analysis/requirements.txt + + - name: Run Review Analysis Script + id: run-script + run: | + python scripts/ps-analysis/ps_review_anomaly.py --package_name com.duckduckgo.mobile.android > output.txt + echo "script_output<> $GITHUB_ENV + cat output.txt >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Get Current Date + id: date + run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Sync Output to Asana + uses: duckduckgo/native-github-asana-sync@v1.1 with: - asana-secret: ${{ secrets.GH_ASANA_SECRET }} - asana-workspace-id: ${{ secrets.GH_ASANA_WORKSPACE_ID }} - asana-project-id: ${{ secrets.GH_ASANA_AOR_PROJECT_ID }} - asana-section-id: ${{ secrets.GH_ASANA_INCOMING_ID }} - asana-task-name: GH Workflow Failure - Production Release - asana-task-description: The end to end workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} \ No newline at end of file + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + asana-project: ${{ vars.GH_ASANA_ANDROID_PS_REVIEWS_PROJECT }} + asana-section: ${{ vars.GH_ASANA_ANDROID_PS_REVIEWS_SECTION_ID }} + asana-task-name: Google Play Review Analysis -- ${{ env.current_date }} + asana-task-description: ${{ env.script_output }} + action: 'create-asana-task' \ No newline at end of file