Skip to content

Commit eb1cd8f

Browse files
authored
ci: reusable action for restoring packages (#39582)
1 parent 6f76232 commit eb1cd8f

6 files changed

Lines changed: 21 additions & 50 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Restore Packages Build'
2+
description: 'Downloads and unpacks the packages build artifact'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Restore packages build
8+
uses: actions/download-artifact@v8
9+
with:
10+
name: packages-build
11+
path: /tmp
12+
13+
- name: Unpack packages build
14+
shell: bash
15+
run: |
16+
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .

.github/workflows/ci-code-check.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,7 @@ jobs:
4343

4444
- uses: rharkor/caching-for-turbo@v1.8
4545

46-
- name: Restore packages build
47-
uses: actions/download-artifact@v8
48-
with:
49-
name: packages-build
50-
path: /tmp
51-
52-
- name: Unpack packages build
53-
shell: bash
54-
run: |
55-
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
46+
- uses: ./.github/actions/restore-packages
5647

5748
- name: Cache TypeCheck
5849
uses: actions/cache@v5

.github/workflows/ci-test-e2e.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,7 @@ jobs:
125125

126126
- uses: rharkor/caching-for-turbo@v1.8
127127

128-
- name: Restore packages build
129-
uses: actions/download-artifact@v8
130-
with:
131-
name: packages-build
132-
path: /tmp
133-
134-
- name: Unpack packages build
135-
shell: bash
136-
run: |
137-
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
128+
- uses: ./.github/actions/restore-packages
138129

139130
# Download Docker images from build artifacts
140131
- name: Download Docker images

.github/workflows/ci-test-storybook.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,7 @@ jobs:
3737

3838
- uses: rharkor/caching-for-turbo@v1.8
3939

40-
- name: Restore packages build
41-
uses: actions/download-artifact@v8
42-
with:
43-
name: packages-build
44-
path: /tmp
45-
46-
- name: Unpack packages build
47-
shell: bash
48-
run: |
49-
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
40+
- uses: ./.github/actions/restore-packages
5041

5142
- uses: ./.github/actions/setup-playwright
5243

.github/workflows/ci-test-unit.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,7 @@ jobs:
4141

4242
- uses: rharkor/caching-for-turbo@v1.8
4343

44-
- name: Restore packages build
45-
uses: actions/download-artifact@v8
46-
with:
47-
name: packages-build
48-
path: /tmp
49-
50-
- name: Unpack packages build
51-
shell: bash
52-
run: |
53-
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
44+
- uses: ./.github/actions/restore-packages
5445

5546
- name: Unit Test
5647
run: yarn testunit --concurrency=1

.github/workflows/ci.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,7 @@ jobs:
296296
steps:
297297
- uses: actions/checkout@v6
298298

299-
- name: Restore packages build
300-
uses: actions/download-artifact@v8
301-
with:
302-
name: packages-build
303-
path: /tmp
304-
305-
- name: Unpack packages build
306-
shell: bash
307-
run: |
308-
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
299+
- uses: ./.github/actions/restore-packages
309300

310301
# we only build and publish the actual docker images if not a PR from a fork
311302
- name: Image ${{ matrix.service[0] }}

0 commit comments

Comments
 (0)