Skip to content

Commit b4bebbd

Browse files
committed
fix: modified the condition
1 parent fd5fc0c commit b4bebbd

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

.github/workflows/build-preview-environment.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ jobs:
5757
echo "PR_ENV_NAME=${{ steps.sanitize_env.outputs.trimmed_env_name }}" >> $GITHUB_ENV
5858
echo "PR_ENV_NAME=${{ steps.sanitize_env.outputs.trimmed_env_name }}" >> $GITHUB_OUTPUT
5959
60-
# build-wf-service:
61-
# needs: deploy-dev-pr-environment
62-
# uses: ./.github/workflows/build-push-docker-images.yml
63-
# with:
64-
# registry: ghcr.io/${{ github.repository_owner }}
65-
# context: services/workflows-service
66-
# image_name: workflows-service
67-
# ref: ${{ needs.deploy-dev-pr-environment.outputs.ref }}
68-
# tag: ${{ needs.deploy-dev-pr-environment.outputs.env_name }}
69-
# file: 'services/workflows-service/Dockerfile'
60+
build-wf-service:
61+
needs: deploy-dev-pr-environment
62+
uses: ./.github/workflows/build-push-docker-images.yml
63+
with:
64+
registry: ghcr.io/${{ github.repository_owner }}
65+
context: services/workflows-service
66+
image_name: workflows-service
67+
ref: ${{ needs.deploy-dev-pr-environment.outputs.ref }}
68+
tag: ${{ needs.deploy-dev-pr-environment.outputs.env_name }}
69+
file: 'services/workflows-service/Dockerfile'
7070

7171
build-wf-service-ee:
72-
needs: [deploy-dev-pr-environment]
72+
needs: [deploy-dev-pr-environment,build-wf-service]
7373
uses: ./.github/workflows/build-push-docker-images.yml
7474
with:
7575
registry: ghcr.io/${{ github.repository_owner }}
@@ -113,7 +113,7 @@ jobs:
113113
file: 'apps/workflows-dashboard/Dockerfile.preview'
114114

115115
deploy-preview:
116-
needs: [deploy-dev-pr-environment,build-wf-service-ee,build-backoffice,build-kyb,build-dashboard]
116+
needs: [deploy-dev-pr-environment,build-wf-service,build-wf-service-ee,build-backoffice,build-kyb,build-dashboard]
117117
runs-on: ubuntu-latest
118118
steps:
119119
- name: Trigger workflow in another repo

.github/workflows/build-push-docker-images.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ jobs:
8989
# run: git fetch --tags origin
9090

9191
- name: Get version
92-
if: ${{ inputs.image_name }} == 'workflows-service'
92+
if: ${{ inputs.image_name == 'workflows-service' }}
9393
id: version
9494
run: |
9595
echo ${{ inputs.image_name }}
96-
# git fetch --tags origin
97-
# TAG=$(git tag -l "$(echo workflow-service@)*" | sort -V -r | head -n 1)
98-
# echo "tag=$TAG"
99-
# echo "tag=$TAG" >> "$GITHUB_OUTPUT"
100-
# echo "TAG=$TAG" >> "$GITHUB_ENV"
101-
# SHORT_SHA=$(git rev-parse --short HEAD)
102-
# echo "sha_short=$SHORT_SHA" >> "$GITHUB_OUTPUT"
103-
# echo "SHORT_SHA=$SHORT_SHA" >> "$GITHUB_ENV"
96+
git fetch --tags origin
97+
TAG=$(git tag -l "$(echo workflow-service@)*" | sort -V -r | head -n 1)
98+
echo "tag=$TAG"
99+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
100+
echo "TAG=$TAG" >> "$GITHUB_ENV"
101+
SHORT_SHA=$(git rev-parse --short HEAD)
102+
echo "sha_short=$SHORT_SHA" >> "$GITHUB_OUTPUT"
103+
echo "SHORT_SHA=$SHORT_SHA" >> "$GITHUB_ENV"
104104
105105
- name: Bump version
106106
id: bump-version
107-
if: ${{ inputs.image_name }} == 'workflows-service'
107+
if: ${{ inputs.image_name == 'workflows-service' }}
108108
uses: ./.github/actions/bump-version
109109
with:
110110
tag: ${{ steps.version.outputs.tag }}
@@ -146,7 +146,7 @@ jobs:
146146
- name: Print docker version outputs
147147
run: |
148148
echo "Metadata: ${{ steps.docker_meta.outputs.tags }}"
149-
if [[ "${{ inputs.image_name }}" == "workflows-service" && ${{ inputs.image_name }} != 'workflows-service-ee' ]]; then
149+
if [[ "${{ inputs.image_name }}" == "workflows-service" && "${{ inputs.image_name }}" != "workflows-service-ee" ]]; then
150150
echo "sha_short: ${{ steps.version.outputs.sha_short }}"
151151
echo "bump-version-version: ${{ steps.bump-version.outputs.version }}"
152152
echo "bump-version-tag: ${{ steps.bump-version.outputs.tag }}"

0 commit comments

Comments
 (0)