-
Notifications
You must be signed in to change notification settings - Fork 102
43 lines (36 loc) · 1.49 KB
/
workflow-tester72.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Test 72 # Related to https://stackoverflow.com/questions/74386773/github-actions-job-is-skipped-although-all-needs-succeeded
on:
push:
jobs:
auto-versioning:
runs-on: ubuntu-latest
steps:
- run: echo 'auto-versioning'
set-deployment-env:
runs-on: ubuntu-latest
steps:
- run: echo 'set-deployment-env'
terraform-apply:
runs-on: ubuntu-latest
steps:
- run: echo 'terraform-apply'
build-test-api:
uses: GuillaumeFalourd/poc-github-actions/.github/workflows/48-reusable-workflow-1.yml@main
needs: [set-deployment-env, auto-versioning]
if: |
always() &&
(needs.set-deployment-env.result == 'success') &&
(needs.auto-versioning.result == 'success' || needs.auto-versioning.result == 'skipped')
debug-deploy-api:
runs-on: ubuntu-latest
needs: [build-test-api, terraform-apply, set-deployment-env]
if: always() # Had to add this, otherwise it would be skipped just as "deploy-api".
steps:
- run: |
echo "Result of auto-versioning: ${{ needs.auto-versioning.result }}"
echo "Result of build-test-api: ${{ needs.build-test-api.result }}"
echo "Result of terraform-apply: ${{ needs.terraform-apply.result }}"
echo "Result of set-deployment-env: ${{ needs.set-deployment-env.result }}"
deploy-api: #always skipped
needs: [build-test-api, terraform-apply, set-deployment-env]
uses: GuillaumeFalourd/poc-github-actions/.github/workflows/48-reusable-workflow-1.yml@main