File: sync_branches.yml

package info (click to toggle)
rocm-docs-core 1.31.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,728 kB
  • sloc: python: 2,002; sh: 199; javascript: 152; cpp: 29; makefile: 27
file content (28 lines) | stat: -rw-r--r-- 831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: "Sync to develop"

on:
  workflow_call:
    inputs:
      sha:
        required: true
        type: string
  workflow_dispatch:

jobs:
  sync_branches:
    runs-on: ubuntu-latest
    concurrency: sync_branches
    name: Sync the branch with the default branch (develop)
    steps:
    - name: Push develop forward (ff only)
      shell: sh
      run: |
        REF="refs/heads/${{ github.event.repository.default_branch }}"
        gh api "/repos/${{ github.repository }}/git/$REF"   \
          --method PATCH                                    \
          --header "Accept: application/vnd.github+json"    \
          --header "X-GitHub-Api-Version: 2022-11-28"       \
          --raw-field sha='${{ inputs.sha || github.sha }}' \
          --field force=false
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}