Skip to content

Commit d1e7d28

Browse files
committed
update actions
Signed-off-by: Julio Ortega <julio.ortega@dialpad.com>
1 parent 7a85e8f commit d1e7d28

File tree

12 files changed

+141
-353
lines changed

12 files changed

+141
-353
lines changed

.github/workflows/a11y_tests.yml

Lines changed: 22 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ on:
1919
- 'packages/dialtone-vue2/**'
2020
- 'packages/dialtone-vue3/**'
2121

22-
permissions:
23-
packages: read
24-
2522
env:
2623
HUSKY: 0
2724

@@ -56,41 +53,27 @@ jobs:
5653
needs: filter-actions
5754
if: ${{ needs.filter-actions.outputs.dialtone-vue-2 == 'true' }}
5855
runs-on: ubuntu-latest
56+
permissions:
57+
packages: read
5958
steps:
6059
- name: Check out branch
6160
uses: actions/checkout@v4
6261

63-
- name: Use Node.js
64-
uses: actions/setup-node@v4
65-
with:
66-
node-version: 22
67-
6862
- name: Use pnpm
6963
uses: pnpm/action-setup@v3
70-
with:
71-
version: 9
72-
run_install: false
7364

74-
- name: Get pnpm store directory
75-
shell: bash
76-
run: |
77-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
78-
79-
- name: Setup pnpm cache
80-
uses: actions/cache@v4
65+
- name: Use Node.js
66+
uses: actions/setup-node@v4
8167
with:
82-
path: ${{ env.STORE_PATH }}
83-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
84-
restore-keys: |
85-
${{ runner.os }}-pnpm-store-
86-
87-
- name: Set @dialpad registry to GitHub packages
88-
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
89-
90-
- name: Set GitHub auth token
91-
run: pnpm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
68+
node-version-file: ".nvmrc"
69+
cache: "pnpm"
70+
registry-url: "https://npm.pkg.github.com"
71+
scope: "dialpad"
72+
env:
73+
NODE_AUTH_TOKEN: ${{ github.token }}
9274

9375
- name: Install dependencies
76+
shell: bash
9477
run: pnpm install --frozen-lockfile
9578

9679
- name: Install Playwright Browsers
@@ -103,41 +86,27 @@ jobs:
10386
needs: filter-actions
10487
if: ${{ needs.filter-actions.outputs.dialtone-vue-3 == 'true' }}
10588
runs-on: ubuntu-latest
89+
permissions:
90+
packages: read
10691
steps:
10792
- name: Check out branch
10893
uses: actions/checkout@v4
10994

110-
- name: Use Node.js
111-
uses: actions/setup-node@v4
112-
with:
113-
node-version: 22
114-
11595
- name: Use pnpm
11696
uses: pnpm/action-setup@v3
117-
with:
118-
version: 9
119-
run_install: false
12097

121-
- name: Get pnpm store directory
122-
shell: bash
123-
run: |
124-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
125-
126-
- name: Setup pnpm cache
127-
uses: actions/cache@v4
98+
- name: Use Node.js
99+
uses: actions/setup-node@v4
128100
with:
129-
path: ${{ env.STORE_PATH }}
130-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
131-
restore-keys: |
132-
${{ runner.os }}-pnpm-store-
133-
134-
- name: Set @dialpad registry to GitHub packages
135-
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
136-
137-
- name: Set GitHub auth token
138-
run: pnpm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
101+
node-version-file: ".nvmrc"
102+
cache: "pnpm"
103+
registry-url: "https://npm.pkg.github.com"
104+
scope: "dialpad"
105+
env:
106+
NODE_AUTH_TOKEN: ${{ github.token }}
139107

140108
- name: Install dependencies
109+
shell: bash
141110
run: pnpm install --frozen-lockfile
142111

143112
- name: Install Playwright Browsers

.github/workflows/deploy-preview.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
contents: read
4949
id-token: write
5050
pull-requests: write
51+
packages: read
5152
env:
5253
VUEPRESS_BASE_URL: /deploy-previews/pr-${{ github.event.pull_request.number }}/
5354
DIALTONE_BUCKET_DIRECTORY: dialtone.dialpad.com/deploy-previews/pr-${{ github.event.pull_request.number }}/
@@ -58,31 +59,21 @@ jobs:
5859
with:
5960
ref: "refs/pull/${{ github.event.pull_request.number }}/merge"
6061

61-
- name: Use Node.js
62-
uses: actions/setup-node@v4
63-
with:
64-
node-version: 22
65-
6662
- name: Use pnpm
6763
uses: pnpm/action-setup@v3
68-
with:
69-
version: 9
70-
run_install: false
7164

72-
- name: Get pnpm store directory
73-
shell: bash
74-
run: |
75-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
76-
77-
- name: Setup pnpm cache
78-
uses: actions/cache@v4
65+
- name: Use Node.js
66+
uses: actions/setup-node@v4
7967
with:
80-
path: ${{ env.STORE_PATH }}
81-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
82-
restore-keys: |
83-
${{ runner.os }}-pnpm-store-
68+
node-version-file: ".nvmrc"
69+
cache: "pnpm"
70+
registry-url: "https://npm.pkg.github.com"
71+
scope: "dialpad"
72+
env:
73+
NODE_AUTH_TOKEN: ${{ github.token }}
8474

8575
- name: Install dependencies
76+
shell: bash
8677
run: pnpm install --frozen-lockfile
8778

8879
# ---------- #

.github/workflows/deploy.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
- 'packages/**'
1717
- 'apps/**'
1818

19-
permissions:
20-
packages: read
21-
2219
env:
2320
HUSKY: 0
2421

@@ -77,6 +74,7 @@ jobs:
7774
permissions:
7875
contents: read
7976
id-token: write
77+
packages: read
8078
env:
8179
VUEPRESS_BASE_URL: ${{ github.ref == 'refs/heads/production' && '/' || format('/{0}/', needs.get-branch-name.outputs.current_branch) }}
8280
DIALTONE_BUCKET_DIRECTORY: dialtone.dialpad.com${{ github.ref == 'refs/heads/production' && '/' || format('/{0}/', needs.get-branch-name.outputs.current_branch) }}
@@ -88,37 +86,21 @@ jobs:
8886
- name: Checkout
8987
uses: actions/checkout@v4
9088

91-
- name: Use Node.js
92-
uses: actions/setup-node@v4
93-
with:
94-
node-version: 22
95-
9689
- name: Use pnpm
9790
uses: pnpm/action-setup@v3
98-
with:
99-
version: 9
100-
run_install: false
10191

102-
- name: Get pnpm store directory
103-
shell: bash
104-
run: |
105-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
106-
107-
- name: Setup pnpm cache
108-
uses: actions/cache@v4
92+
- name: Use Node.js
93+
uses: actions/setup-node@v4
10994
with:
110-
path: ${{ env.STORE_PATH }}
111-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
112-
restore-keys: |
113-
${{ runner.os }}-pnpm-store-
114-
115-
- name: Set @dialpad registry to GitHub packages
116-
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
117-
118-
- name: Set GitHub auth token
119-
run: pnpm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
95+
node-version-file: ".nvmrc"
96+
cache: "pnpm"
97+
registry-url: "https://npm.pkg.github.com"
98+
scope: "dialpad"
99+
env:
100+
NODE_AUTH_TOKEN: ${{ github.token }}
120101

121102
- name: Install dependencies
103+
shell: bash
122104
run: pnpm install --frozen-lockfile
123105

124106
# ---------- #

.github/workflows/lint-pr.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,31 @@ on:
66
branches:
77
- staging
88

9-
permissions:
10-
packages: read
11-
129
jobs:
1310
commit-lint:
1411
runs-on: ubuntu-latest
12+
permissions:
13+
packages: read
1514

1615
steps:
1716
- name: Check out branch
1817
uses: actions/checkout@v4
1918

20-
- name: Use Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 22
24-
2519
- name: Use pnpm
2620
uses: pnpm/action-setup@v3
27-
with:
28-
version: 9
29-
run_install: false
30-
31-
- name: Get pnpm store directory
32-
shell: bash
33-
run: |
34-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
3521

36-
- name: Setup pnpm cache
37-
uses: actions/cache@v4
22+
- name: Use Node.js
23+
uses: actions/setup-node@v4
3824
with:
39-
path: ${{ env.STORE_PATH }}
40-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
41-
restore-keys: |
42-
${{ runner.os }}-pnpm-store-
43-
44-
- name: Set @dialpad registry to GitHub packages
45-
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
46-
47-
- name: Set GitHub auth token
48-
run: pnpm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
25+
node-version-file: ".nvmrc"
26+
cache: "pnpm"
27+
registry-url: "https://npm.pkg.github.com"
28+
scope: "dialpad"
29+
env:
30+
NODE_AUTH_TOKEN: ${{ github.token }}
4931

5032
- name: Install dependencies
33+
shell: bash
5134
run: pnpm install --frozen-lockfile
5235

5336
- name: Lint pull request title

.github/workflows/publish-android.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
- production
1717
- rebrand-2025-beta
1818

19-
permissions:
20-
packages: read
21-
2219
env:
2320
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2421

@@ -68,6 +65,8 @@ jobs:
6865
matrix:
6966
package: ${{ fromJSON(needs.filter-actions.outputs.packages) }}
7067
runs-on: ubuntu-latest
68+
permissions:
69+
packages: read
7170
steps:
7271
- name: Set working Dir
7372
run: |
@@ -76,37 +75,21 @@ jobs:
7675
- name: Checkout
7776
uses: actions/checkout@v4
7877

79-
- name: Use Node.js
80-
uses: actions/setup-node@v4
81-
with:
82-
node-version: 22
83-
8478
- name: Use pnpm
8579
uses: pnpm/action-setup@v3
86-
with:
87-
version: 9
88-
run_install: false
8980

90-
- name: Get pnpm store directory
91-
shell: bash
92-
run: |
93-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
94-
95-
- name: Setup pnpm cache
96-
uses: actions/cache@v4
81+
- name: Use Node.js
82+
uses: actions/setup-node@v4
9783
with:
98-
path: ${{ env.STORE_PATH }}
99-
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
100-
restore-keys: |
101-
${{ runner.os }}-pnpm-store-
102-
103-
- name: Set @dialpad registry to GitHub packages
104-
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
105-
106-
- name: Set GitHub auth token
107-
run: pnpm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
84+
node-version-file: ".nvmrc"
85+
cache: "pnpm"
86+
registry-url: "https://npm.pkg.github.com"
87+
scope: "dialpad"
88+
env:
89+
NODE_AUTH_TOKEN: ${{ github.token }}
10890

10991
- name: Install dependencies
92+
shell: bash
11093
run: pnpm install --frozen-lockfile
11194

11295
- name: Setup Java

0 commit comments

Comments
 (0)