-
Notifications
You must be signed in to change notification settings - Fork 26
57 lines (54 loc) · 2.02 KB
/
publish-starters.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish Starters
on:
workflow_dispatch:
inputs:
type:
description: "Type can be: all | examples | starters"
required: true
# all | examples | starters
default: "examples"
jobs:
publish-examples:
if: ${{ github.event.inputs.type == 'examples' || github.event.inputs.type == 'all' }}
runs-on: ubuntu-latest
strategy:
matrix:
example: [chronoblog-netlify-cms]
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.1.5
with:
node-version: 15
- run: npm i
- run: npm run generate-starters
- name: Push "examples/${{ matrix.example }}" to "gatsby-starter-${{ matrix.example }}" repo
uses: cpina/github-action-push-to-another-repository@master
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: "examples/${{ matrix.example }}"
destination-github-username: "Chronoblog"
destination-repository-name: "gatsby-starter-${{ matrix.example }}"
user-email: 8168280+Ganevru@users.noreply.github.com
publish-starters:
if: ${{ github.event.inputs.type == 'starters' || github.event.inputs.type == 'all' }}
runs-on: ubuntu-latest
strategy:
matrix:
starter: [chronoblog, chronoblog-hacker, chronoblog-profile]
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.1.5
with:
node-version: 15
- run: npm i
- run: npm run generate-starters
- name: Push "starters/${{ matrix.starter }}" to "gatsby-starter-${{ matrix.starter }}" repo
uses: cpina/github-action-push-to-another-repository@master
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: "starters/${{ matrix.starter }}"
destination-github-username: "Chronoblog"
destination-repository-name: "gatsby-starter-${{ matrix.starter }}"
user-email: 8168280+Ganevru@users.noreply.github.com