Skip to content

Commit

Permalink
Update deploy-to-production.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kukrejaravi9 authored Sep 3, 2024
1 parent 3b722c5 commit df2d6de
Showing 1 changed file with 2 additions and 38 deletions.
40 changes: 2 additions & 38 deletions .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,19 @@ name: Example Workflow
on: [push]

jobs:
my_job_two:
runs-on: ubuntu-latest
outputs:
WORKFLOW_CANCELLED: ${{ steps.test-step-two.outputs.WORKFLOW_CANCELLED }}
steps:
- name: echo input
id: test-step
run: echo "Hello World 123456"

- name: Dummy
id: test-step-two
run: |
echo "Hello World 123456"
- name: Is cancelled
run: echo "Hello World 123456"

my_job_one:
needs: [my_job_two]
my_job_one:
if: ${{ always() }}
runs-on: ubuntu-latest
outputs:
WORKFLOW_CANCELLED: ${{ steps.test-step-two.outputs.WORKFLOW_CANCELLED }}
steps:
- name: echo input
id: test-step
run: echo "Hello World 123456"

- name: Dummy
id: test-step-two
if: cancelled()
run: |
echo "WORKFLOW_CANCELLED=true" >> GITHUB_OUTPUT
- name: Is cancelled
if: cancelled()
if: steps.test-step-two.outputs.WORKFLOW_CANCELLED == 'true'
run: echo "cancelled() == true"

slack_update_result_cancelled:
if: ${{ always() }}
needs: [ my_job_one, my_job_two]
uses: kukrejaravi9/TestRepo/.github/workflows/reusable-deploy-to-server.yml@main
with:
environment: ${{ needs.my_job_one.outputs.WORKFLOW_CANCELLED }}
secrets: inherit

slack_update_result_cancelled_another:
if: ${{ cancelled() }}
needs: [ my_job_one ]
uses: kukrejaravi9/TestRepo/.github/workflows/reusable-deploy-to-server.yml@main
with:
environment: 'true'
secrets: inherit

0 comments on commit df2d6de

Please sign in to comment.