Skip to content

Update Flagsmith Defaults #1121

Update Flagsmith Defaults

Update Flagsmith Defaults #1121

name: Update Flagsmith Defaults
on:
schedule:
- cron: 0 8 * * *
workflow_dispatch:
permissions:
contents: read
id-token: write # For the Flagsmith trust relationship
jobs:
update_server_defaults:
runs-on: depot-ubuntu-latest
name: Update API Flagsmith Defaults
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
with:
client-id: ${{ vars.FLAGSMITH_ENGINEERING_GH_APP_ID }}
private-key: ${{ secrets.FLAGSMITH_ENGINEERING_GH_APP_PRIVATE_KEY }}
# Only what create-pull-request needs: push the branch, open and label
# the pull request.
permission-contents: write
permission-pull-requests: write
- name: Install Flagsmith CLI
uses: Flagsmith/setup-cli@c7154aaa37dff8aca0b66afc1e6722e7ad00c115 # v1.0.0
- name: Update defaults
run: make -C api update-flagsmith-environment
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: Update API Flagsmith Defaults
delete-branch: true
title: "chore: Update Flagsmith environment document"
labels: api
token: ${{ steps.app-token.outputs.token }}