-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-default-and-deploy-reusable-workflows.yml
More file actions
60 lines (48 loc) · 2 KB
/
push-default-and-deploy-reusable-workflows.yml
File metadata and controls
60 lines (48 loc) · 2 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Push Default and Deploy - Reusable Workflow
on:
push:
branches:
- main
workflow_dispatch:
permissions: # Permissions for OIDC
id-token: write
contents: read
concurrency:
group: push-default-and-deploy-reusable-workflows-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Before composite action
run: echo "This is a step before the composite action."
- name: Build and Test Python Project
uses: TomSmithCoding/python-build-test-custom-action@main
with:
python-version: "3.x"
output-path: "src"
- name: After composite action
run: echo "This is a step after the composite action."
deploy-mock-dev:
needs: build-and-test
uses: TomSmithCoding/test_github_actions/.github/workflows/deploy-to-environment-reusable.yml@main
with:
environment-name: DEV
artifact-name: pythonproject-build
#secrets: inherit # Can specify any secrets that this reusable workflow needs to inherit from the parent workflow
deploy-mock-staging:
needs: build-and-test
uses: TomSmithCoding/test_github_actions/.github/workflows/deploy-to-environment-reusable.yml@main
with:
environment-name: STAGING
artifact-name: pythonproject-build
#secrets: inherit # Can specify any secrets that this reusable workflow needs to inherit from the parent workflow
deploy-mock-production:
needs:
- deploy-mock-dev
- deploy-mock-staging
uses: TomSmithCoding/test_github_actions/.github/workflows/deploy-to-environment-reusable.yml@main
with:
environment-name: PROD
artifact-name: pythonproject-build
#secrets: inherit # Can specify any secrets that this reusable workflow needs to inherit from the parent workflow