Skip to content

Use pwshBot account to allow PR creation in GitHub Workflow #733

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 8 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .github/workflows/createReminder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: 'Create reminder'

permissions:
contents: read

on:
issue_comment:
types: [created, edited]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/processReminders.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: 'Process reminders'

permissions:
contents: read

on:
schedule:
- cron: '*/15 * * * *'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
on:
issue_comment:
types: [created]

permissions:
contents: read

name: Automatic Rebase
jobs:
rebase:
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

name: Update Release Build Parameters
name: Daily Updates

permissions:
contents: read

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/update.yml'
branches:
- master
- add-gh-action
pull_request:
paths:
- '.github/workflows/update.yml'
schedule:
# At 20:20 UTC on every day-of-week from Monday through Friday.
- cron: '0 0/4 * * *'
Expand All @@ -27,6 +21,9 @@ jobs:
name: Update Release Build Parameters
timeout-minutes: 15
runs-on: ubuntu-20.04
permissions:
pull-requests: write
contents: write # for peter-evans/create-pull-request to create branch
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -37,23 +34,24 @@ jobs:
- name: Create Pull Request
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
id: cpr
uses: peter-evans/create-pull-request@v3
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
uses: peter-evans/create-pull-request@v4
with:
token: "${{ secrets.PR_PAT }}"
commit-message: "Update the release build yaml with the latest versions"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
committer: PwshBot <pwshbot@microsoft.com>
author: PwshBot <pwshbot@microsoft.com>
title: "Update the release build yaml with the latest versions"
assignees: travisez13
reviewers: travisez13
base: master
draft: false
branch: update-release-build
push-to-fork: pwshBot/PowerShell-Docker
update-matrix-json:
name: Update Matrix Json
timeout-minutes: 15
runs-on: ubuntu-20.04
permissions:
pull-requests: write
contents: write # for peter-evans/create-pull-request to create branch
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -70,16 +68,14 @@ jobs:
- name: Create Pull Request
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
id: cpr
uses: peter-evans/create-pull-request@v3
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
uses: peter-evans/create-pull-request@v4
with:
token: "${{ secrets.PR_PAT }}"
commit-message: "Update the matrix json"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
committer: PwshBot <pwshbot@microsoft.com>
author: PwshBot <pwshbot@microsoft.com>
title: "Update the matrix json"
assignees: travisez13
reviewers: travisez13
base: master
draft: false
branch: update-matrix-json
push-to-fork: pwshBot/PowerShell-Docker