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

Commit

Permalink
fs-4294 using shared workflow to determine jobs (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
srh-sloan authored Mar 20, 2024
1 parent cbe4062 commit e828d32
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/copilot_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,9 @@ on:

jobs:
setup:
runs-on: ubuntu-latest
outputs:
jobs_to_run: ${{ steps.determine-jobs.outputs.job_list }}
steps:
- id: determine-jobs
run: |
if [ "${{ inputs.environment }}" != '' ]; then
export jobs='["${{ inputs.environment }}"]'
elif [ "${{ github.ref }}" == 'refs/heads/main' ]; then
export jobs='["dev", "test", "uat", "prod"]'
else
export jobs='["dev", "test"]'
fi
echo "job_list=$(jq -cn --argjson keys "$jobs" '$keys')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
uses: communitiesuk/funding-service-design-workflows/.github/workflows/determine-jobs.yml@main
with:
environment: ${{ inputs.environment }}

pre_deploy_tests:
uses: communitiesuk/funding-service-design-workflows/.github/workflows/pre-deploy.yml@main
Expand Down

0 comments on commit e828d32

Please sign in to comment.