-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 2.97 KB
/
Copy pathmain_manual_qa_cloud.yml
File metadata and controls
71 lines (64 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# 🧪 QA Test - Umami Cloud (@umami-server-3.0.3)
#
# Tests packaged orphan branch. To update version: edit 'uses:' line below.
# 📚 Doc: .github/CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
#
name: main_manual_qa_cloud
permissions:
contents: none
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
umamiReportJob:
name: Manual QA Umami Cloud action-umami-report@umami-server-3.0.3
runs-on: ubuntu-latest
env:
UMAMI_LOGO: https://raw.githubusercontent.com/umami-software/website/refs/heads/master/public/images/umami-logo.png
outputs:
umami_page_views: ${{ steps.umamiReportStep.outputs.pageViews }}
umami_report_file: ${{ steps.umamiReportStep.outputs.umamiReportFile }}
# umami_report: ${{ steps.umamiReport.outputs.umamiReport }}
# umami_one_line_report: ${{ steps.umamiReport.outputs.umamiOneLineReport }}
steps:
- name: QA Umami report - orphanBranch=umami-server-3.0.3
id: umamiReportStep
uses: boly38/action-umami-report@umami-server-3.0.3
with:
umami-cloud-api-key: ${{secrets.UMAMI_TEST_CLOUD_API_KEY}}
umami-site-domain: ${{secrets.UMAMI_TEST_CLOUD_SITE_DOMAIN}}
umami-report-file: 'umamiReport.txt'
env:
UMAMI_CLIENT_TIMEOUT_MS: 5000
- name: Assume umamiReportFile exists and pageViews != 0
run: |
if [[ -z "${{ steps.umamiReportStep.outputs.umamiReportFile }}" ]]; then
echo "::error title=no umamiReportFile::❌ Error : no umamiReportFile"
exit 1
fi
if [[ "${{ steps.umamiReportStep.outputs.pageViews }}" == "0" ]]; then
echo "::notice title=no pageViews::ℹ️ pageViews=0 😞"
exit 0
fi
echo "::notice title=OneLineReport::ℹ️ ${{ steps.umamiReportStep.outputs.umamiOneLineReport }}"
- name: Send Umami Cloud report to discord if pageViews is positive
if: steps.umamiReportStep.outputs.pageViews != '0'
uses: tsickert/discord-webhook@v7.0.0
with:
webhook-url: ${{ secrets.UMAMI_TO_DISCORD_WEBHOOK_URL }}
username: "Umami report"
avatar-url: ${{ env.UMAMI_LOGO }}
content: "${{ steps.umamiReportStep.outputs.umamiOneLineReport }}"
filename: "${{ steps.umamiReportStep.outputs.umamiReportFile }}"
- name: Have a look at !secret results from next step using outputs
run: |
echo "${{ steps.umamiReportStep.outputs.umamiReportFile }}"
ls -la "${{ steps.umamiReportStep.outputs.umamiReportFile }}"
nextJob:
needs: umamiReportJob
name: github action next job
runs-on: ubuntu-latest
steps:
- name: print var
run: |
echo "FROM umamiReport outputs: ${{ needs.umamiReportJob.outputs.umami_report_file }} and ${{ needs.umamiReportJob.outputs.umami_page_views }} pageviews "