Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
BAU - use a single source for version
Browse files Browse the repository at this point in the history
  • Loading branch information
robk-dluhc committed Nov 7, 2023
1 parent 93e83a3 commit dcd4b3a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/copilot_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@ on:
- '.github/workflows/copilot_deploy.yml'

jobs:
tag_version:
runs-on: ubuntu-latest
outputs:
version_to_tag: ${{ steps.notification_tagging.outputs.tag_value }}
steps:
- id: notification_tagging
run: |
echo "tag_value=$(echo '${{ github.ref }}' | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_OUTPUT
paketo_build:
needs: [ tag_version ]
permissions:
packages: write
uses: communitiesuk/funding-service-design-workflows/.github/workflows/package.yml@main
with:
version_to_build: $(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
version_to_build: ${{ needs.tag_version.outputs.version_to_tag }}
owner: ${{ github.repository_owner }}
application: funding-service-design-fund-store
pre_deploy_tests:
Expand Down Expand Up @@ -71,7 +81,7 @@ jobs:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
needs: [ pre_deploy_tests, paketo_build, copilot_environments_workflow_setup ]
needs: [ tag_version, pre_deploy_tests, paketo_build, copilot_environments_workflow_setup ]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -104,7 +114,7 @@ jobs:
- name: Inject replacement image into manifest
run: |
yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-fund-store:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}"' copilot/fsd-fund-store/manifest.yml
yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-fund-store:${{ github.ref_name == 'main' && 'latest' || needs.tag_version.outputs.version_to_tag }}"' copilot/fsd-fund-store/manifest.yml
- name: Copilot ${{ matrix.value }} deploy
id: deploy_build
Expand Down

0 comments on commit dcd4b3a

Please sign in to comment.