-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.69 KB
/
new-meetup.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: New meetup
env:
MEETUP_FOLDER: './packages/site/src/content/meetups'
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
permissions:
contents: write
pull-requests: write
issues: write
on:
issues:
types: [opened]
jobs:
new-meetup:
runs-on: ubuntu-latest
if: "contains( github.event.issue.labels.*.name, 'meetup' )"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/setup-and-cache
- name: Set time zone
run: sudo timedatectl set-timezone Europe/Helsinki
- name: Create new meetup
id: new_meetup
run: |
pnpm -r --filter=actions-new-meetup... install
pnpm -r --filter=actions-new-meetup... run build
pnpm -r --filter=actions-new-meetup run start
env:
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ github.token }}
- name: Create pull request
uses: peter-evans/create-pull-request@v5
id: create_pr
with:
branch: ${{ steps.new_meetup.outputs.branch_name }}
title: ${{ steps.new_meetup.outputs.pull_request_title }}
body: ${{ steps.new_meetup.outputs.pull_request_body }}
- name: Update comment
run: |
pnpm -r --filter=actions-post-create-pr... install
pnpm -r --filter=actions-post-create-pr... run build
pnpm -r --filter=actions-post-create-pr run start
env:
PULL_REQUEST_NUMBER: ${{ steps.create_pr.outputs.pull-request-number }}
COMMENT_ID: ${{ steps.new_meetup.outputs.comment_id }}
GITHUB_TOKEN: ${{ github.token }}