@@ -9,8 +9,7 @@ concurrency:
99 cancel-in-progress : false
1010
1111permissions :
12- contents : write
13- pull-requests : write
12+ contents : read
1413
1514jobs :
1615 setup :
6059 results
6160 artifacts
6261 if-no-files-found : error
63-
64- publish :
65- needs : [setup, run]
66- runs-on : ubuntu-latest
67- steps :
68- - name : create github app token
69- id : app-token
70- uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
71- with :
72- app-id : ${{ vars.PRIMER_APP_ID_SHARED }}
73- private-key : ${{ secrets.PRIMER_APP_PRIVATE_KEY_SHARED }}
74- - name : checkout repository
75- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
76- with :
77- fetch-depth : 0
78- ref : ${{ github.event.repository.default_branch }}
79- token : ${{ steps.app-token.outputs.token }}
80- - name : download baseline results
81- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
82- with :
83- pattern : baseline-${{ github.run_id }}-*
84- merge-multiple : true
85- - name : merge baseline results
86- env :
87- RUN_DATE : ${{ needs.setup.outputs.run-date }}
88- run : |
89- jq --slurp \
90- '.[0] + {treatments: [.[].treatments[]], results: [.[].results[]]}' \
91- results/"$RUN_DATE"/output-*.json > results/"$RUN_DATE"/output.json
92- rm results/"$RUN_DATE"/output-*.json
93- - name : open baseline results pull request
94- env :
95- GH_TOKEN : ${{ steps.app-token.outputs.token }}
96- DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
97- RUN_DATE : ${{ needs.setup.outputs.run-date }}
98- run : |
99- git config user.name "github-actions[bot]"
100- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
101- git add results
102- if git diff --cached --quiet; then
103- exit 0
104- fi
105- branch="chore/baseline-$RUN_DATE"
106- git checkout -b "$branch"
107- git commit -m "chore: record baseline results for $RUN_DATE"
108- git push origin "$branch"
109- gh pr create \
110- --base "$DEFAULT_BRANCH" \
111- --head "$branch" \
112- --title "chore: record baseline results for $RUN_DATE" \
113- --body "Automated weekly baseline results for $RUN_DATE."
62+ retention-days : 90
63+ compression-level : 9
0 commit comments