Skip to content

Commit 644a253

Browse files
committed
fix it
1 parent e092d56 commit 644a253

File tree

3 files changed

+58
-52
lines changed

3 files changed

+58
-52
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@ env:
88
BRANCH_NAME: ${{ github.event.ref.BRANCH_NAME }}
99

1010
jobs:
11-
quality_checks:
12-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.0
13-
secrets:
14-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
15-
with:
16-
install_java: true
17-
18-
get_commit_id:
19-
runs-on: ubuntu-22.04
20-
outputs:
21-
commit_id: ${{ steps.commit_id.outputs.commit_id }}
22-
steps:
23-
- name: Get Commit ID
24-
id: commit_id
25-
run: |
26-
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
2711
get_asdf_version:
2812
runs-on: ubuntu-22.04
2913
outputs:
@@ -41,6 +25,24 @@ jobs:
4125
run: |
4226
TAG_FORMAT=$(yq '.TAG_FORMAT' .github/config/settings.yml)
4327
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
28+
quality_checks:
29+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.0
30+
needs: [get_asdf_version]
31+
secrets:
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33+
with:
34+
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
35+
install_java: true
36+
37+
get_commit_id:
38+
runs-on: ubuntu-22.04
39+
outputs:
40+
commit_id: ${{ steps.commit_id.outputs.commit_id }}
41+
steps:
42+
- name: Get Commit ID
43+
id: commit_id
44+
run: |
45+
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
4446
4547
tag_release:
4648
needs: [quality_checks, get_commit_id, get_asdf_version]

.github/workflows/pull_request.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,31 @@ env:
88
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
99

1010
jobs:
11+
get_asdf_version:
12+
runs-on: ubuntu-22.04
13+
outputs:
14+
asdf_version: ${{ steps.asdf-version.outputs.version }}
15+
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
20+
- name: Get asdf version
21+
id: asdf-version
22+
run: echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
23+
- name: Load config value
24+
id: load-config
25+
run: |
26+
TAG_FORMAT=$(yq '.TAG_FORMAT' .github/config/settings.yml)
27+
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
1128
quality_checks:
1229
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.0
13-
secrets:
14-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30+
needs: [get_asdf_version]
1531
with:
32+
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
1633
install_java: true
34+
secrets:
35+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1736

1837
pr_title_format_check:
1938
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/pr_title_check.yml@f80157cecce288dd175e61b477a1d2dbe9c88b99
@@ -44,23 +63,6 @@ jobs:
4463
).data[0].number;
4564
}
4665
result-encoding: string
47-
get_asdf_version:
48-
runs-on: ubuntu-22.04
49-
outputs:
50-
asdf_version: ${{ steps.asdf-version.outputs.version }}
51-
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
52-
steps:
53-
- name: Checkout code
54-
uses: actions/checkout@v5
55-
56-
- name: Get asdf version
57-
id: asdf-version
58-
run: echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
59-
- name: Load config value
60-
id: load-config
61-
run: |
62-
TAG_FORMAT=$(yq '.TAG_FORMAT' .github/config/settings.yml)
63-
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
6466

6567
tag_release:
6668
needs: [get_asdf_version]

.github/workflows/release.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ env:
77
BRANCH_NAME: ${{ github.event.ref.BRANCH_NAME }}
88

99
jobs:
10-
quality_checks:
11-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.0
12-
secrets:
13-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
14-
with:
15-
install_java: true
16-
17-
get_commit_id:
18-
runs-on: ubuntu-22.04
19-
outputs:
20-
commit_id: ${{ steps.commit_id.outputs.commit_id }}
21-
steps:
22-
- name: Get Commit ID
23-
id: commit_id
24-
run: |
25-
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
26-
2710
get_asdf_version:
2811
runs-on: ubuntu-22.04
2912
outputs:
@@ -41,6 +24,25 @@ jobs:
4124
run: |
4225
TAG_FORMAT=$(yq '.TAG_FORMAT' .github/config/settings.yml)
4326
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
27+
quality_checks:
28+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.0
29+
needs: [get_asdf_version]
30+
secrets:
31+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32+
with:
33+
install_java: true
34+
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
35+
36+
get_commit_id:
37+
runs-on: ubuntu-22.04
38+
outputs:
39+
commit_id: ${{ steps.commit_id.outputs.commit_id }}
40+
steps:
41+
- name: Get Commit ID
42+
id: commit_id
43+
run: |
44+
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
45+
4446
tag_release:
4547
needs: [quality_checks, get_commit_id, get_asdf_version]
4648
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/tag-release.yml@f80157cecce288dd175e61b477a1d2dbe9c88b99

0 commit comments

Comments
 (0)