-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.54 KB
/
build_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
name: "Build Docker images and push to DockerHub"
on:
# Triggers the workflow on push or pull request events but only for the master and production branches
# and any updates to the etl scripts
push:
branches:
- main
paths:
- ".github/workflows/build_docker_images.yml"
- "etl/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/build_docker_images.yml"
- "etl/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build docker images
runs-on: ubuntu-22.04
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Paths filter"
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
parse_email_save_attachment:
- 'etl/parse_email_save_attachment/**'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Maximo/Geo Emergency Mgmt image
if: steps.changes.outputs.parse_email_save_attachment == 'true'
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: etl/parse_email_save_attachment
push: true
tags: atddocker/maximo-geo-emergency-mgmt:${{ github.ref == 'refs/heads/master' && 'production' || 'latest' }}