-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (54 loc) · 2.12 KB
/
CoreDevelopTest.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
# Runs weekly build against develop idea is to give us
# a reasonable warning when DUNE develop and core
# are incompatible! Also pushes container for easy testing
name: Weekly Core Integration
on:
schedule:
- cron: '0 0 * * 0' # Might as well do everything Sunday at midngiht
push:
branches: [hwallace/feature/additional_workflows]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false # KS: Prevents cancellation of remaining jobs if one fails
matrix:
include:
- os: alma9
file: doc/MaCh3DockerFiles/Alma9/Dockerfile
tag_latest: alma9latest
name: Image CD ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build Docker image
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
docker build . \
--file "${{ matrix.file }}" \
--tag "ghcr.io/dune/mach3:${{ matrix.os }}${{ github.ref_name }}" \
--build-arg MACH3_DUNE_VERSION="${{ github.ref_name }}" \
--build-arg MACH3_CORE_VERSION=develop
else
docker build . \
--file "${{ matrix.file }}" \
--tag "ghcr.io/dune/mach3:${{ matrix.tag_latest }}" \
--build-arg MACH3_DUNE_VERSION="hwallace/feature/additional_workflows" \
--build-arg MACH3_CORE_VERSION=develop
fi
- name: Push Docker image
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
docker push "ghcr.io/dune/mach3:${{ matrix.os }}${{ github.ref_name }}_develop_build"
else
docker push "ghcr.io/dune/mach3:${{ matrix.tag_latest }}_develop_build"
fi
- name: Delete old images
uses: actions/delete-package-versions@v5
with:
package-name: 'mach3'
package-type: 'container'
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'