Skip to content

Repaired examples

Repaired examples #1

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# This is a basic workflow to help you get started with Actions
name: "Powershell Update Reference Docs PR"
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- 'weekly_v2_docs_update_*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
updateHelpsDocsPR:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Configure User
run: |
git config --global user.email "[email protected]"
git config --global user.name "Timothy Wamalwa"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
# Create a pull request [1]
- name: Create PR using the GitHub REST API via hub
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE_TITLE: "Docs Update"
MESSAGE_BODY: "This pull request was automatically created by the GitHub Action,\n\n Contains Help Docs"
REVIEWERS: timayabi2020,timayabi2020
ASSIGNEDTO: peombwa
LABELS: generated
BASE: main
HEAD: ${{steps.create_branch.outputs.branch}}
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
bin/hub pull-request -b "$BASE" -h "$HEAD" -m "$MESSAGE_TITLE" -m "$MESSAGE_BODY" -r "$REVIEWERS" -a "$ASSIGNEDTO" -l "$LABELS"
# References
# [0] https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
# [1] https://hub.github.com/hub-pull-request.1.html
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token