-
Notifications
You must be signed in to change notification settings - Fork 8
103 lines (91 loc) · 3.18 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
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]' }}
steps:
- name: '🐙️ Checkout'
id: pull-checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 10
- 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 '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: '📦 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 }}
# 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:
BUILD_COMMAND: 'build'
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}