-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<<EOF" >> $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/[email protected] | ||
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 }} | ||
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' |