2019-08-13 07:28:20 +08:00
|
|
|
name: Sync templates and CI config.
|
2019-08-13 07:07:52 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-08-13 07:10:14 +08:00
|
|
|
- debug-sync
|
2019-08-13 07:07:52 +08:00
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2020-08-30 03:57:12 +08:00
|
|
|
sync-templates-and-ci-config:
|
2020-08-29 23:13:51 +08:00
|
|
|
if: github.repository == 'Homebrew/homebrew-cask'
|
2019-08-13 07:07:52 +08:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-29 23:13:51 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
repo:
|
|
|
|
- Homebrew/homebrew-cask-drivers
|
|
|
|
- Homebrew/homebrew-cask-fonts
|
|
|
|
- Homebrew/homebrew-cask-versions
|
2019-08-13 07:07:52 +08:00
|
|
|
steps:
|
2020-08-29 23:13:51 +08:00
|
|
|
- name: Clone main repository
|
|
|
|
uses: actions/checkout@v2
|
2019-08-13 07:28:20 +08:00
|
|
|
with:
|
2020-08-29 23:13:51 +08:00
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: Clone secondary repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: ${{ matrix.repo }}
|
|
|
|
path: vendor/${{ matrix.repo }}
|
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: Configure Git user
|
|
|
|
uses: Homebrew/actions/git-user-config@master
|
|
|
|
with:
|
|
|
|
username: BrewTestBot
|
|
|
|
|
|
|
|
- name: Detect changes
|
|
|
|
id: detect_changes
|
|
|
|
run: ./.github/actions/sync/templates.rb 'vendor/${{ matrix.repo }}' '${{ matrix.repo }}' 'sync-templates-and-ci-config'
|
|
|
|
|
|
|
|
- name: Create pull request
|
2020-12-09 22:35:21 +08:00
|
|
|
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
|
2020-08-29 23:13:51 +08:00
|
|
|
with:
|
|
|
|
path: vendor/${{ matrix.repo }}
|
|
|
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
|
|
|
branch: sync-templates-and-ci-config
|
|
|
|
title: Synchronize templates and CI configuration.
|
|
|
|
body: >
|
|
|
|
This pull request was created automatically by the
|
|
|
|
[`sync-templates-and-ci-config`](https://github.com/Homebrew/homebrew-cask/blob/master/.github/workflows/sync-templates-and-ci-config.yml)
|
|
|
|
workflow.
|
|
|
|
if: ${{ steps.detect_changes.outputs.pull_request == 'true' }}
|