forked from MuonColliderSoft/mucoll-spack
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (72 loc) · 2.41 KB
/
mucoll-rebuild.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
name: Re-build and publish MuColl
on:
push:
paths:
- '.github/workflows/mucoll-rebuild.yml'
- '.cherry-pick'
- 'AlmaLinux9/Dockerfile-sim'
- 'environments/**'
- 'packages/**'
workflow_dispatch:
env:
REGISTRY: ghcr.io
permissions:
contents: read
packages: write
id-token: write
attestations: write
jobs:
build-sim:
runs-on: ubuntu-latest
strategy:
matrix:
os: [{dir: AlmaLinux9,suffix: alma9}]
env:
IMAGE_NAME: mucoll-sim
steps:
- name: Free Disk Space (Ubuntu)
uses: endersonmenezes/free-disk-space@v2
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
remove_swap: true
remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
remove_packages_one_command: true
remove_folders: "/usr/share/swift /usr/share/miniconda /usr/share/az* /usr/share/glade* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell"
testing: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: lowercase owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
context: ./${{matrix.os.dir}}
file: ./${{matrix.os.dir}}/Dockerfile-sim
build-args: |
VERSION=${{ steps.meta.outputs.version }}
REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
MUCOLL_BRANCH=${{ steps.meta.outputs.version }}
tags: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}