Skip to content

Deploy to Production from main #16

Deploy to Production from main

Deploy to Production from main #16

Workflow file for this run

name: Commit Checks
on: push
jobs:
define-environment:
name: Set ✨ environment ✨ based on the branch 🌳
runs-on: ubuntu-latest
steps:
- name: Set the environment
id: define_environment
run: |
if [ "${{ github.ref_name }}" == "main" ]; then
echo "env_name=production" >> $GITHUB_OUTPUT
else
echo "No environment associated with ${GITHUB_REF##*/} branch"
fi
- name: Print the environment
if: ${{ steps.define_environment.outputs.env_name }}
run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}"
outputs:
env_name: ${{ steps.define_environment.outputs.env_name }}
deploy:
needs: define-environment
permissions:
id-token: write
contents: write
uses: "./.github/workflows/deploy.yaml"

Check failure on line 27 in .github/workflows/push.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/push.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/push.yaml" -> "./.github/workflows/deploy.yaml" (source branch with sha:33fb50bc6b8f4bd38dbb6e4819e80fce47c1cf26) : a step cannot have both the `uses` and `run` keys
if : ${{ needs.define-environment.outputs.env_name }}
with:
environment: ${{ needs.define-environment.outputs.env_name }}
aws-region: "us-west-2"
secrets: inherit