Skip to content

Commit aa4f185

Browse files
authored
chore(GAT-1234): Refactor GitHub Actions for release environment
1 parent 60c1d01 commit aa4f185

1 file changed

Lines changed: 8 additions & 32 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,14 @@ on:
77
- "release/*"
88

99
jobs:
10-
setup-preprod:
10+
setup:
1111
runs-on: ubuntu-latest
12-
environment: preprod
13-
outputs:
14-
docker_build_args: ${{ steps.args.outputs.docker_build_args }}
15-
steps:
16-
- name: Read BASE IMAGE VERSION file
17-
id: getappversion
18-
run: |
19-
echo "appversion=$(sed -n 's/^MEDCAT_BASE_IMAGE_VERSION=\(.*\)/\1/p' < medcat_versions.yml)" >> "$GITHUB_OUTPUT"
20-
21-
- id: args
22-
run: |
23-
ARGS=""
24-
ARGS+="--build-arg MEDCAT_BASE_IMAGE_VERSION=${{ steps.getappversion.outputs.appversion }} "
25-
echo "docker_build_args=$ARGS" >> "$GITHUB_OUTPUT"
26-
27-
setup-prod:
28-
runs-on: ubuntu-latest
29-
environment: prod
12+
environment: release
3013
outputs:
3114
docker_build_args: ${{ steps.args.outputs.docker_build_args }}
3215
steps:
16+
- uses: actions/checkout@v6
17+
3318
- name: Read BASE IMAGE VERSION file
3419
id: getappversion
3520
run: |
@@ -41,20 +26,11 @@ jobs:
4126
ARGS+="--build-arg MEDCAT_BASE_IMAGE_VERSION=${{ steps.getappversion.outputs.appversion }} "
4227
echo "docker_build_args=$ARGS" >> "$GITHUB_OUTPUT"
4328
44-
build-preprod:
45-
needs: setup-preprod
29+
build:
30+
needs: setup
4631
uses: HDRUK/github-actions-templates/.github/workflows/docker-build.yaml@main
4732
with:
48-
environment: preprod
49-
docker_build_args: ${{ needs.setup-preprod.outputs.docker_build_args }}
33+
environment: release
34+
docker_build_args: ${{ needs.setup.outputs.docker_build_args }}
5035
chart_path: chart/gateway-medcat/Chart.yaml
5136
secrets: inherit
52-
53-
build-prod:
54-
needs: setup-prod
55-
uses: HDRUK/github-actions-templates/.github/workflows/docker-build.yaml@main
56-
with:
57-
environment: prod
58-
docker_build_args: ${{ needs.setup-prod.outputs.docker_build_args }}
59-
chart_path: chart/gateway-medcat/Chart.yaml
60-
secrets: inherit

0 commit comments

Comments
 (0)