-
Notifications
You must be signed in to change notification settings - Fork 246
64 lines (56 loc) · 2.1 KB
/
build_docker_images_for_ci.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
name: Build Docker Images for CI
# this workflow creates the Docker-Images used in the Continuous Integration (CI)
# It intentionally creates all images, such that they are on the same state
on:
push:
branches:
- 'master'
paths:
- 'scripts/docker_files/docker_file_ci_ubuntu_22_04/*'
- 'scripts/docker_files/docker_file_ci_centos_7/*'
- '.github/workflows/build_docker_images_for_ci.yml'
pull_request:
branches:
- 'master'
paths:
- 'scripts/docker_files/docker_file_ci_ubuntu_22_04/*'
- 'scripts/docker_files/docker_file_ci_centos_7/*'
- '.github/workflows/build_docker_images_for_ci.yml'
workflow_dispatch:
# for cancelling redundant runs
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-docker-ubuntu-jammy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file scripts/docker_files/docker_file_ci_ubuntu_22_04/DockerFile --tag kratosmultiphysics/kratos-image-ci-ubuntu-22-04
- name: Docker Login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish the Docker image
if: ${{ github.event_name == 'push'}}
# only push the new image when the changes are merged to master
run: docker push kratosmultiphysics/kratos-image-ci-ubuntu-22-04
build-docker-centos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file scripts/docker_files/docker_file_ci_centos_7/DockerFile --tag kratosmultiphysics/kratos-image-ci-centos7
- name: Docker Login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish the Docker image
if: ${{ github.event_name == 'push'}}
# only push the new image when the changes are merged to master
run: docker push kratosmultiphysics/kratos-image-ci-centos7