name: authentik-on-release-next-branch

on:
  schedule:
    - cron: "0 12 * * *" # every day at noon
  workflow_dispatch:

permissions:
  # Needed to be able to push to the next branch
  contents: write

jobs:
  update-next:
    runs-on: ubuntu-latest
    environment: internal-production
    steps:
      - uses: actions/checkout@v4
        with:
          ref: main
      - run: |
          git push origin --force main:next