Feat: Vertical navigation changes and bug fixes (#164) #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Multi stage build & deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main", "Development" ] | |
paths: | |
- "src/**" | |
- ".github/workflows/matrix-deploy.yml" | |
jobs: | |
set-env: | |
runs-on: ubuntu-latest | |
name: Set Environment (Matrix Deploy) | |
outputs: | |
branch: ${{ steps.var.outputs.branch }} | |
checked-out-sha: ${{ steps.var.outputs.checked-out-sha }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- id: var | |
run: | | |
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} | |
CHECKED_OUT_SHA="$(git log -1 '--format=format:%H')" | |
echo "branch=$GIT_BRANCH" >> $GITHUB_OUTPUT | |
echo "checked-out-sha=${CHECKED_OUT_SHA}" >> $GITHUB_OUTPUT | |
create-and-publish-image: | |
needs: set-env | |
name: Create & Publish Image | |
uses: ./.github/workflows/build-image.yml | |
secrets: inherit | |
with: | |
branch: ${{ needs.set-env.outputs.branch }} | |
checked-out-sha: ${{ needs.set-env.outputs.checked-out-sha }} | |
create-and-tag-release: | |
needs: [ set-env, create-and-publish-image ] | |
name: Create & Tag Release | |
uses: ./.github/workflows/create-tag-release.yml | |
secrets: inherit | |
deploy-to-dev: | |
needs: [ set-env, create-and-publish-image ] | |
name: Deployment to Dev & Test | |
strategy: | |
max-parallel: 1 | |
fail-fast: true | |
matrix: | |
target: [ Dev ] | |
uses: ./.github/workflows/deploy-image.yml | |
with: | |
environment: ${{ matrix.target }} | |
branch: ${{ needs.set-env.outputs.branch }} | |
checked-out-sha: ${{ needs.set-env.outputs.checked-out-sha }} | |
secrets: inherit |