Skip to content

Sync reference even if there are conflicts. #16364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions .github/workflows/language-reference.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: language-reference-documentation
name: Language reference documentation

on:
push:
Expand All @@ -14,14 +14,14 @@ permissions:

jobs:
build-and-push:
name: Build reference documentation and push it
permissions:
contents: write # for Git to git push
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Git Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -67,26 +67,22 @@ jobs:
fi
cd ..

- name: Merge changes to main
if: github.event_name == 'push'
run: |
cd dotty
git fetch origin main:main
git checkout main
git config user.name gh-actions
git config user.email [email protected]
git merge language-reference-stable
cd ..

- name: Create pull request with backport to main
if: github.event_name == 'push'
uses: peter-evans/create-pull-request@v4
backport-to-main:
name: Create pull request with backport to main
permissions:
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3
- uses: repo-sync/pull-request@v2
with:
path: dotty
branch: language-reference-backport
labels: area:documentation
title: Backport changes from stable documentation branch
body: This pull request is created automatically after push to stable documentation branch and backports the changes
reviewers: pikinier20,julienrf
assignees: pikinier20
destination_branch: main
pr_label: area:documentation
pr_title: Sync with the stable documentation branch
pr_body: |
This pull request is syncing the `main` with changes from `language-reference-stable`.

It was created automatically after ${{ github.event.head_commit.id }} by @${{ github.event.head_commit.author.username }}
pr_assignee: ${{ github.event.head_commit.author.username }}