Skip to content

New deployment for "workflows" triggered by lukasz-wal #7

New deployment for "workflows" triggered by lukasz-wal

New deployment for "workflows" triggered by lukasz-wal #7

name: Deploy New Version
run-name: New deployment for "${{ github.ref_name }}" triggered by ${{ github.actor }}
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- workflows
workflow_dispatch:
inputs:
version:
description: 'Enter the version number'
required: true
default: 'latest'
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.prepare-matrix.outputs.matrix }}
steps:
- name: Determine matrix
id: set-matrix
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "matrix=$(jq -cr '@json' <<< "['staging']")" >> $GITHUB_OUTPUT
else
echo "matrix=$(jq -cr '@json' <<< "['production', 'staging']")" >> $GITHUB_OUTPUT
fi
ReuseableMatrixJobForDeployment:
needs: 'prepare-matrix'
strategy:
matrix:
build-type: ${{ fromJSON(steps.prepare-matrix.outputs.matrix) }}

Check failure on line 38 in .github/workflows/deploy-new-version.yml

View workflow run for this annotation

GitHub Actions / Deploy New Version

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-new-version.yml (Line: 38, Col: 21): Unrecognized named-value: 'steps'. Located at position 10 within expression: fromJSON(steps.prepare-matrix.outputs.matrix) .github/workflows/deploy-new-version.yml (Line: 38, Col: 21): Unexpected value '${{ fromJSON(steps.prepare-matrix.outputs.matrix) }}'
include:
- build-type: production
tag_suffix: prod
environment: production-fidl
- build-type: staging
tag_suffix: stg
environment: staging-fidl
uses: ./.github/workflows/release-new-version.yml
with:
tag_suffix: ${{ matrix.tag_suffix }}
environment: ${{ matrix.environment }}
secrets: inherit
# reuseable-matrix-job:
# strategy:
# matrix:
# build-type: [production, staging]
# include:
# - build-type: production
# tag_suffix: prod
# environment: production-fidl
# - build-type: staging
# tag_suffix: stg
# environment: staging-fidl
# uses: ./.github/workflows/release-new-version.yml
# with:
# stage: ${{ matrix.build-type }}
# tag_suffix: ${{ matrix.tag_suffix }}
# environment: ${{ matrix.environment }}
# secrets: inherit