name: 3 | Push staging -> prod

# This CI job is responsible for force pushing the content of releases/staging to releases/prod. It
# is restricted to web-reviewers through virtue of the GitHub environment protection rules for the
# prod environment.

on:
  workflow_dispatch:

jobs:
  push-prod:
    name: 'Push to prod branch'
    runs-on: ubuntu-latest
    environment:
      name: push/prod
    steps:
      - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
        with:
          token: ${{ secrets.RELEASE_SERVICE_ACCESS_TOKEN }}
          ref: releases/staging
      - name: Git config
        run: |
          git config user.name "UL Service Account"
          git config user.email "hello-happy-puppy@users.noreply.github.com"
      - name: Git push
        run: |
          git push origin releases/staging:releases/prod --force
