-
Notifications
You must be signed in to change notification settings - Fork 15
100 lines (96 loc) · 3.81 KB
/
deploy-docker-images.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build and push docker images
on:
pull_request: {}
push:
branches:
- '**'
tags:
- 'v*'
env:
REGISTRY: ghcr.io
DOCKER_DIRECTORY: docker/images
PLATFORMS: |
linux/amd64
PATH_TO_DEPLOY_DOCKER_IMAGES_WORKFLOW: .github/workflows/deploy-docker-images.yml
jobs:
env-setup:
# Since env variables can't be passed to reusable workflows, we need to pass them as outputs
name: Setup environment
runs-on: ubuntu-22.04
outputs:
docker_registry: ${{ env.REGISTRY }}
docker_directory: ${{ env.DOCKER_DIRECTORY }}
platforms: ${{ env.PLATFORMS }}
path_to_deploy_docker_images_workflow: ${{ env.PATH_TO_DEPLOY_DOCKER_IMAGES_WORKFLOW }}
steps:
- id: check
run: |
echo "Setting up environment"
mosquitto:
needs:
- env-setup
name: Build and push mosquitto docker image
uses: everest/everest-ci/.github/workflows/[email protected]
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
image_name: ${{ github.event.repository.name }}/mosquitto
directory: ${{ needs.env-setup.outputs.docker_directory }}/mosquitto
docker_registry: ${{ needs.env-setup.outputs.docker_registry }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
platforms: ${{ needs.env-setup.outputs.platforms }}
depends_on_paths: |
${{ needs.env-setup.outputs.path_to_deploy_docker_images_workflow }}
steve:
needs:
- env-setup
name: Build and push steve docker image
uses: everest/everest-ci/.github/workflows/[email protected]
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
image_name: ${{ github.event.repository.name }}/steve
directory: ${{ needs.env-setup.outputs.docker_directory }}/steve
docker_registry: ${{ needs.env-setup.outputs.docker_registry }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
platforms: ${{ needs.env-setup.outputs.platforms }}
depends_on_paths: |
${{ needs.env-setup.outputs.path_to_deploy_docker_images_workflow }}
mqtt-explorer:
needs:
- env-setup
name: Build and push mqtt-explorer docker image
uses: everest/everest-ci/.github/workflows/[email protected]
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
image_name: ${{ github.event.repository.name }}/mqtt-explorer
directory: ${{ needs.env-setup.outputs.docker_directory }}/mqtt-explorer
docker_registry: ${{ needs.env-setup.outputs.docker_registry }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
platforms: ${{ needs.env-setup.outputs.platforms }}
depends_on_paths: |
${{ needs.env-setup.outputs.path_to_deploy_docker_images_workflow }}
nodered:
needs:
- env-setup
name: Build and push nodered docker image
uses: everest/everest-ci/.github/workflows/[email protected]
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
image_name: ${{ github.event.repository.name }}/nodered
directory: ${{ needs.env-setup.outputs.docker_directory }}/nodered
docker_registry: ${{ needs.env-setup.outputs.docker_registry }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
platforms: ${{ needs.env-setup.outputs.platforms }}
depends_on_paths: |
${{ needs.env-setup.outputs.path_to_deploy_docker_images_workflow }}