-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (114 loc) Β· 4.26 KB
/
pull.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: ' βΆοΈ Pull'
on:
pull_request:
branches:
- main
- canary
- develop
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
concurrency:
group: pull-${{ github.ref }}-1
cancel-in-progress: true
env:
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GH_DEPLOY_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GH_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
jobs:
pull:
name: 'π·οΈ CI'
if: github.event.pull_request.draft == false && !contains(github.event.head_commit.message, '[skip ci]')
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
GH_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
IS_ACTOR_VERIFIED: ${{ github.actor == 'jeromefitz' || github.actor == 'renovate[bot]' }}
IS_ACTOR_JEROMEFITZ: ${{ github.actor == 'jeromefitz' }}
IS_ACTOR_DEPENDABOT: ${{ github.actor == 'dependabot[bot]' }}
IS_ACTOR_RENOVATE: ${{ github.actor == 'renovate[bot]' }}
IS_LABEL_PNPM: ${{ contains( github.event.pull_request.labels.*.name, 'π¦ pnpm' ) }}
steps:
- name: 'ποΈ Checkout'
id: pull-checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
- name: 'π½οΈ Init'
id: pull-init
uses: JeromeFitz/packages/.github/actions/init@main
# - name: 'π§ͺ debug'
# id: pull-debug
# shell: bash
# run: |
# echo 'IS_ACTOR_VERIFIED: ${{ env.IS_ACTOR_VERIFIED }}'
# echo 'IS_ACTOR_JEROMEFITZ: ${{ env.IS_ACTOR_JEROMEFITZ }}'
# echo 'IS_ACTOR_RENOVATE: ${{ env.IS_ACTOR_RENOVATE }}'
# echo 'IS_LABEL_PNPM: ${{ env.IS_LABEL_PNPM }}'
# echo 'github.actor: ${{ github.actor }}'
# - name: 'π§ͺ debug ii'
# id: pull-debug-ii
# if: ${{ env.IS_ACTOR_VERIFIED == 'true' }}
# shell: bash
# run: |
# echo 'Note: true is a string π'
# - name: 'π§ͺ debug iii'
# id: pull-debug-iii
# if: ${{ env.IS_ACTOR_RENOVATE == 'true' || env.IS_LABEL_PNPM == 'true' }}
# shell: bash
# run: |
# echo 'Note: This _would_ run the pnpm check'
# NOTE: Turn this off until determine if renovate handles this
# - name: 'π pnpm'
# id: pull-pnpm
# uses: JeromeFitz/packages/.github/actions/pnpm@main
# if: ${{ env.IS_ACTOR_RENOVATE == 'true' || env.IS_LABEL_PNPM == 'true' }}
# with:
# IS_ACTOR_VERIFIED: ${{ env.IS_ACTOR_VERIFIED }}
# IS_ACTOR_JEROMEFITZ: ${{ env.IS_ACTOR_JEROMEFITZ }}
# IS_ACTOR_DEPENDABOT: ${{ env.IS_ACTOR_DEPENDABOT }}
# IS_ACTOR_RENOVATE: ${{ env.IS_ACTOR_RENOVATE }}
# IS_LABEL_PNPM: ${{ env.IS_LABEL_PNPM }}
- name: 'π¦ Install'
id: pull-install
uses: JeromeFitz/packages/.github/actions/install@main
# - name: 'πΊοΈ Cache (turbo)'
# id: pull-cache-turbo
# uses: JeromeFitz/packages/.github/actions/cache-turbo@main
# with:
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# - name: 'π¨οΈ Lint'
# id: pull-lint
# uses: JeromeFitz/packages/.github/actions/lint@main
# with:
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
- name: 'π¨οΈ Lint'
id: pull-lint
shell: bash
run: |
pnpm run lint
# https://docs.github.com/en/actions/learn-github-actions/expressions
- name: 'π Commit Message'
id: pull-commit-message
run: |
echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT
# - name: 'ποΈ Build'
# id: pull-build
# uses: JeromeFitz/packages/.github/actions/build@main
# with:
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}