-
Notifications
You must be signed in to change notification settings - Fork 15
65 lines (62 loc) · 2.31 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
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/deploy-single-docker-image.yml@refactor-docker-images
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/deploy-single-docker-image.yml@refactor-docker-images
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 }}