This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 263
51 lines (48 loc) · 2.04 KB
/
update-nimbus-experiments.yml
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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/
name: "Update Nimbus Experiments"
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch: {}
jobs:
update-nimbus-experiments:
name: "Update Nimbus Experiments"
runs-on: ubuntu-latest
steps:
- name: "Checkout Main Branch"
uses: actions/checkout@v3
with:
path: focus-ios
ref: main
fetch-depth: 0
- name: "Update Experiments JSON"
id: update-experiments-json
uses: mozilla-mobile/update-experiments@v3
with:
repo-path: focus-ios
output-path: Blockzilla/Nimbus/initial_experiments.json
experimenter-url: https://experimenter.services.mozilla.com/api/v6/experiments-first-run/
app-name: focus_ios
branch: automation/update-nimbus-experiments
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v4
if: steps.update-experiments-json.outputs.changed == 1 && steps.update-experiments-json.outputs.changed-branch >= 1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: focus-ios
branch: automation/update-nimbus-experiments
commit-message: "Automated: update initial_experiments.json based on the current first-run experiments in experimenter"
title: "Update initial experiments JSON for Nimbus"
body: "This (automated) PR updates the initial_experiments.json on the `main` branch"
delete-branch: true
labels: Needs Code Review
- name: Enable Pull Request Automerge
if: steps.create-pull-request.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }}
merge-method: squash