-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (101 loc) · 3.64 KB
/
gentoo-lhapdf-looptools-hepmc3-rivet3-herwig7.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
101
102
103
104
105
name: gentoo-lhapdf-looptools-hepmc3-rivet3-herwig7 Docker Image CI
on:
push:
branches: [ "master" ]
paths:
- gentoo/lhapdf/looptools/hepmc3/rivet3/herwig7/Dockerfile
- .github/workflows/gentoo-lhapdf-looptools-hepmc3-rivet3-herwig7.yml
schedule:
- cron: 0 6 14 * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
#runs-on: self-hosted
timeout-minutes: 4320 # 72h
strategy:
fail-fast: false
max-parallel: 1
matrix:
user: ["apnpucky"]
base: [ "gentoo" ]
image: [
"lhapdf-looptools-hepmc3-rivet3-herwig7",
]
platforms: [
"linux/amd64",
#,linux/386, linux/arm64,linux/ppc64le,linux/riscv64,linux/arm/v5,linux/arm/v6,linux/arm/v7, #,linux/s390x,
]
lhapdf: [ "6.5.4" ]
looptools: [ "2.15" ]
rivet3: [ "3.1.10" ]
hepmc3: [ "3.2.6" ]
herwig7: [ "7.3.0" ]
steps:
-
name: Set up version
id: version
run: |
VERSION=${{ matrix.image }}
VERSION=${VERSION//lhapdf/${{ matrix.lhapdf }}}
VERSION=${VERSION//looptools/${{ matrix.looptools }}}
VERSION=${VERSION//hepmc3/${{ matrix.hepmc3 }}}
VERSION=${VERSION//rivet3/${{ matrix.rivet3 }}}
VERSION=${VERSION//herwig7/${{ matrix.herwig7 }}}
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
-
name: Checkout
uses: actions/checkout@v3
-
name: Get current time
uses: josStorer/get-current-time@v2.0.2
id: current-time
with:
format: YYYYMMDDHHSS
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config: .github/buildkitd.toml
-
name: Login to Docker Hub
uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: abort on existing tag
id: abort
run: |
if docker manifest inspect ${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest; then
echo "STOP"
echo "STOP=true" >> "$GITHUB_OUTPUT"
else
echo "DONT STOP"
echo "STOP=false" >> "$GITHUB_OUTPUT"
fi
-
name: ${{ matrix.base }}-${{ matrix.image }}
if: steps.abort.outputs.STOP == 'false'
uses: docker/build-push-action@v3
with:
file: gentoo/lhapdf/looptools/hepmc3/rivet3/herwig7/Dockerfile
platforms: ${{ matrix.platforms }}
push: true
target: ${{ matrix.base }}-${{ matrix.image }}
build-args: |
LHAPDF_VERSION=${{ matrix.lhapdf }}
LOOPTOOLS_VERSION=${{ matrix.looptools }}
HEPMC3_VERSION=${{ matrix.hepmc3 }}
RIVET3_VERSION=${{ matrix.rivet3 }}
HERWIG7_VERSION=${{ matrix.herwig7 }}
tags: |
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ steps.current-time.outputs.formattedTime }}-latest