2022-08-09 21:06:59 +00:00
|
|
|
# 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@v2
|
|
|
|
with:
|
|
|
|
path: fenix
|
|
|
|
ref: main
|
2022-09-09 15:51:43 +00:00
|
|
|
fetch-depth: 0
|
2022-08-09 21:06:59 +00:00
|
|
|
- name: "Update Experiments JSON"
|
|
|
|
id: update-experiments-json
|
2022-09-09 15:51:43 +00:00
|
|
|
uses: mozilla-mobile/update-experiments@v2
|
2022-08-09 21:06:59 +00:00
|
|
|
with:
|
|
|
|
repo-path: fenix
|
|
|
|
output-path: app/src/main/res/raw/initial_experiments.json
|
2022-09-09 15:51:43 +00:00
|
|
|
experimenter-url: https://experimenter.services.mozilla.com/api/v6/experiments-first-run/
|
2022-08-09 21:06:59 +00:00
|
|
|
app-name: fenix
|
2022-09-09 15:51:43 +00:00
|
|
|
branch: automation/update-nimbus-experiments
|
2022-08-09 21:06:59 +00:00
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
2022-09-09 15:51:43 +00:00
|
|
|
if: steps.update-experiments-json.outputs.changed == 1 && steps.update-experiments-json.outputs.changed-branch == 1
|
2022-08-09 21:06:59 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
path: fenix
|
|
|
|
branch: automation/update-nimbus-experiments
|
|
|
|
commit-message: "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
|