name: Caterium Direct Production on: workflow_run: workflows: ["Caterium QA"] types: [completed] workflow_dispatch: permissions: contents: write concurrency: group: caterium-production-promotion cancel-in-progress: false jobs: promote: if: >- github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main') runs-on: ubuntu-latest steps: - name: Checkout tested main revision uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || 'main' }} fetch-depth: 0 - name: Publish tested revision to production branch shell: bash run: | set -euo pipefail git push origin HEAD:refs/heads/production