Skip to content

Commit c906dfd

Browse files
authored
save
1 parent 79da34b commit c906dfd

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

.github/workflows/08_Wait_for_deployment.yaml renamed to .github/workflows/08_Wait-for-deployment.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@ on:
55
inputs:
66
environment:
77
type: string
8-
commit:
8+
docker_tag:
99
type: string
1010

1111
workflow_dispatch:
1212
inputs:
1313
environment:
1414
type: environment
15-
commit:
15+
docker_tag:
1616
type: string
1717
jobs:
1818

1919
wait:
2020

2121
name: Wait for deployment to `${{ inputs.environment }}`
2222
runs-on: ubuntu-latest
23-
environment: ${{ inputs.environment }}
2423

2524
steps:
26-
- run: echo "Check is `${{ inputs.commit }}` is deployd to `${{ inputs.environment }}`"
25+
- run: echo "Check is `${{ inputs.docker_tag }}` is deployd to `${{ inputs.environment }}`"

.github/workflows/09_Deploy.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
type: string
8+
output:
9+
docker_tag:
10+
description: "Docker tag"
11+
value: ${{ jobs.deploy.outputs.tag }}
12+
13+
jobs:
14+
15+
deploy:
16+
17+
name: Deploy to `${{ inputs.environment }}`
18+
runs-on: ubuntu-latest
19+
environment: ${{ inputs.environment }}
20+
outputs:
21+
tag: ${{ steps.docker.outputs.tag_name }}
22+
23+
steps:
24+
- run: echo "Deploy to `${{ inputs.environment }}`"
25+
26+
- name: Create output
27+
id: docker
28+
run: |
29+
run: echo "tag_name=latest" >> "$GITHUB_OUTPUT"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy and wait
2+
3+
on:
4+
# label: # uncomment push
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
11+
deploy:
12+
name: Deploy
13+
uses: ./.github/workflows/09_Deploy.yaml
14+
with:
15+
environment: test
16+
17+
wait:
18+
name: Wait
19+
needs:
20+
- deploy
21+
uses: ./.github/workflows/08_Wait-for-deployment.yaml
22+
with:
23+
environment: test
24+
docker_tag: ${{ needs.deploy.outputs.docker_tag }}

0 commit comments

Comments
 (0)