Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjmaclean committed Apr 3, 2024
1 parent 0fae7dc commit 1b8b2bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
- run: |
mv env_file/env_file deployment/${{ github.event.inputs.deploy_environment }}
- run: |
escapedTag=${{ env.APP_IMAGE }}
- run: |
escapedTag=${escapedTag//[\/]/_}
- run: |
echo $escapedTag
tag=${{ env.APP_IMAGE }}
TAG_ESCAPED=${tag//[\/]/_}
echo TAG_ESCAPED=${TAG_ESCAPED} >> $GITHUB_ENV
- name: Inject Variables 1
uses: cschleiden/replace-tokens@v1
Expand All @@ -32,13 +32,14 @@ jobs:
tokenSuffix: '}#'
files: '["deployment/${{ github.event.inputs.deploy_environment }}/*.yaml"]'
env:
APP_IMAGE: ${{ escapedTag }}
#APP_IMAGE: ${{ env.APP_IMAGE }}
APP_IMAGE: ${{ TAG_ESCAPED }}
MAX_REPLICAS: '4'
MIN_REPLICAS: '2'
UTILISATION_AVERAGE_PERCENT: '75'
- run: |
ls -l deployment/${{ github.event.inputs.deploy_environment }}
echo APP_IMAGE ${{ env.APP_IMAGE }}
echo TAG_ESCAPED ${{ TAG_ESCAPED }}
- run: cat deployment/${{ github.event.inputs.deploy_environment }}/deployment.yaml
- run: cat deployment/${{ github.event.inputs.deploy_environment }}/hpa.yaml

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ jobs:

- run: |
tag=${{ github.event.inputs.tag_name || 'develop' }}
echo ${tag//[\/]/_}
escapedTag=${tag//[\/]/_}
echo $escapedTag
TAG_ESCAPED=${tag//[\/]/_}
echo TAG_ESCAPED=${TAG_ESCAPED} >> $GITHUB_ENV
- name: Extract Metadata for Docker Image
id: meta
Expand All @@ -122,7 +121,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
${{ env.PROJECT_VERSION }}
${{ github.event.inputs.tag_name || 'develop' }}
$escapedTag
${{ env.TAG_ESCAPED }}
- name: Build and push
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 1b8b2bf

Please sign in to comment.