Skip to content

Commit

Permalink
test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aplybeah committed May 1, 2024
1 parent 355f9d3 commit 9a62c38
Showing 1 changed file with 39 additions and 15 deletions.
54 changes: 39 additions & 15 deletions .github/workflows/cd-analytics.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Deploy Analytics
# Need to set a default value for when the workflow is triggered from a git push
# which bypasses the default configuration for inputs
run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]')}}
run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'nonprod'}}

on:
push:
branches:
- "main"
paths:
- "analytics/**"
# - "main"
- "alsia/patch-cd-files"
# paths:
# - "analytics/**"
release:
types: [published]
workflow_dispatch:
Expand All @@ -24,15 +25,38 @@ on:
- prod

jobs:
analytics-checks:
name: Run Analyics Checks
uses: ./.github/workflows/ci-analytics.yml
secrets: inherit
# analytics-checks:
# name: Run Analyics Checks
# uses: ./.github/workflows/ci-analytics.yml
# secrets: inherit

# deploy:
# name: Deploy
# needs: analytics-checks
# uses: ./.github/workflows/deploy.yml
# with:
# app_name: "analytics"
# environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || ('dev' && 'staging') }}
test:
name: matrix test output
runs-on: ubuntu-latest
strategy:
matrix:
envs: ${{ github.event_name == 'release' && fromJSON('["prod"]') || fromJSON('["dev", "staging"]') }}
steps:
- name: Test output
run: |
echo ${{ matrix.envs }}
second-test:
name: logical grouping test output
runs-on: ubuntu-latest
env:
location: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || ('dev' && 'staging') }}

steps:
- name: Test output
run: |
echo ${{ env.location }}
deploy:
name: Deploy
needs: analytics-checks
uses: ./.github/workflows/deploy.yml
with:
app_name: "analytics"
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}

0 comments on commit 9a62c38

Please sign in to comment.