Update Nimbus Experiments #32240
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
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: firefox-ios | |
ref: main | |
fetch-depth: 0 | |
- name: "Update Experiments JSON" | |
id: update-experiments-json | |
uses: mozilla-mobile/update-experiments@v2 | |
with: | |
repo-path: firefox-ios | |
output-path: Client/Experiments/initial_experiments.json | |
experimenter-url: https://experimenter.services.mozilla.com/api/v6/experiments-first-run/ | |
app-name: firefox_ios | |
branch: automation/update-nimbus-experiments | |
- name: Create Pull Request | |
id: create-pull-request | |
uses: peter-evans/create-pull-request@v3 | |
if: steps.update-experiments-json.outputs.changed == 1 && steps.update-experiments-json.outputs.changed-branch == 1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: firefox-ios | |
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 | |
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 |