Skip to content

Commit

Permalink
hotfix: fix setup for manual workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jon77p authored Nov 26, 2023
1 parent 73d3948 commit d891811
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,58 +47,32 @@ jobs:
setup:
runs-on: ubuntu-latest
outputs:
type: ${{ steps.set-type.outputs.type }}
action: ${{ steps.set-action.outputs.action }}
host: ${{ steps.set-host.outputs.host }}
dry_run: ${{ steps.set-dry-run.outputs.dry_run }}
type: ${{ steps.setup.outputs.type }}
action: ${{ steps.setup.outputs.action }}
host: ${{ steps.setup.outputs.host }}
dry_run: ${{ steps.setup.outputs.dry_run }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set Type
id: set-type
- name: Setup
id: setup
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "type=${{ github.event.inputs.type }}" >> $GITHUB_OUTPUT
else
echo "Unknown event name: ${{ github.event_name }}"
exit 1
fi
- name: Set Action
id: set-action
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "action=${{ github.event.inputs.action }}" >> $GITHUB_OUTPUT
else
echo "Unknown event name: ${{ github.event_name }}"
exit 1
fi
- name: Set host
id: set-host
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "host=${{ github.event.inputs.host }}" >> $GITHUB_OUTPUT
else
echo "Unknown event name: ${{ github.event_name }}"
exit 1
fi
- name: Set dry run (workflow_dispatch)
id: set-dry-run
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "dry_run=${{ github.event.inputs.dry_run }}" >> $GITHUB_OUTPUT
else
echo "Unknown event name: ${{ github.event_name }}"
exit 1
fi
- name: Summary
run: |
echo "# Inputs Summary" >> $GITHUB_STEP_SUMMARY
echo "| Input | Value |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| type | ${{ steps.set-type.outputs.type }} |" >> $GITHUB_STEP_SUMMARY"
echo "| action | ${{ steps.set-action.outputs.action }} |" >> $GITHUB_STEP_SUMMARY"
echo "| host | ${{ steps.set-host.outputs.host }} |" >> $GITHUB_STEP_SUMMARY
echo "| dry_run | ${{ steps.set-dry-run.outputs.dry_run }} |" >> $GITHUB_STEP_SUMMARY
echo "| type | ${{ steps.setup.outputs.type }} |" >> $GITHUB_STEP_SUMMARY"
echo "| action | ${{ steps.setup.outputs.action }} |" >> $GITHUB_STEP_SUMMARY"
echo "| host | ${{ steps.setup.outputs.host }} |" >> $GITHUB_STEP_SUMMARY
ansible:
name: "Ansible CICD"
Expand All @@ -107,7 +81,7 @@ jobs:
uses: ./.github/workflows/ansible-cicd.yml
with:
host: ${{ needs.setup.outputs.host }}
dry_run: ${{ needs.setup.outputs.dry_run }}
dry_run: ${{ github.event.inputs.dry_run }}

cdktf:
name: "CDKTF CICD"
Expand Down

0 comments on commit d891811

Please sign in to comment.