Skip to content

Commit d977d63

Browse files
committed
package code everywhere
1 parent b2619a0 commit d977d63

File tree

4 files changed

+58
-43
lines changed

4 files changed

+58
-43
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ jobs:
101101
with:
102102
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
103103
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
104+
package_npm_code:
105+
needs: [tag_release, quality_checks, get_commit_id]
106+
uses: ./.github/workflows/package_npm_code.yml
104107

105108
release_dev:
106109
needs: [tag_release, package_code, get_commit_id]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: docker image build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
package_npm_code:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v5
12+
with:
13+
ref: ${{ env.BRANCH_NAME }}
14+
15+
# using git commit sha for version of action to ensure we have stable version
16+
- name: Install asdf
17+
uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
18+
with:
19+
asdf_branch: v0.14.1
20+
21+
- name: Cache asdf
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
~/.asdf
26+
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
27+
restore-keys: |
28+
${{ runner.os }}-asdf-
29+
30+
- name: Install asdf dependencies in .tool-versions
31+
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
32+
with:
33+
asdf_branch: v0.14.1
34+
env:
35+
PYTHON_CONFIGURE_OPTS: --enable-shared
36+
37+
- name: Install dependencies
38+
run: |
39+
make install
40+
41+
- name: Package code
42+
run: |
43+
make package
44+
45+
- uses: actions/upload-artifact@v4
46+
name: Upload packaged code
47+
with:
48+
name: NHSDigital-eps-cdk-constructs
49+
path: |
50+
lib/NHSDigital-eps-cdk-constructs-1.0.0.tgz

.github/workflows/pull_request.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -67,50 +67,8 @@ jobs:
6767
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
6868

6969
package_npm_code:
70-
runs-on: ubuntu-22.04
7170
needs: [get_issue_number, quality_checks, get_commit_id]
72-
steps:
73-
- name: Checkout code
74-
uses: actions/checkout@v5
75-
with:
76-
ref: ${{ env.BRANCH_NAME }}
77-
78-
# using git commit sha for version of action to ensure we have stable version
79-
- name: Install asdf
80-
uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
81-
with:
82-
asdf_branch: v0.14.1
83-
84-
- name: Cache asdf
85-
uses: actions/cache@v4
86-
with:
87-
path: |
88-
~/.asdf
89-
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
90-
restore-keys: |
91-
${{ runner.os }}-asdf-
92-
93-
- name: Install asdf dependencies in .tool-versions
94-
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
95-
with:
96-
asdf_branch: v0.14.1
97-
env:
98-
PYTHON_CONFIGURE_OPTS: --enable-shared
99-
100-
- name: Install dependencies
101-
run: |
102-
make install
103-
104-
- name: Package code
105-
run: |
106-
make package
107-
108-
- uses: actions/upload-artifact@v4
109-
name: Upload packaged code
110-
with:
111-
name: NHSDigital-eps-cdk-constructs
112-
path: |
113-
lib/NHSDigital-eps-cdk-constructs-1.0.0.tgz
71+
uses: ./.github/workflows/package_npm_code.yml
11472

11573
release_docker_image:
11674
needs: [get_issue_number, package_docker_image, get_commit_id]

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ jobs:
131131
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
132132
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
133133

134+
package_npm_code:
135+
needs: [tag_release, quality_checks, get_commit_id]
136+
uses: ./.github/workflows/package_npm_code.yml
137+
134138
release_dev:
135139
needs: [tag_release, package_code, get_commit_id]
136140
uses: ./.github/workflows/docker_image_upload.yml

0 commit comments

Comments
 (0)