-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.15 KB
/
container.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
# build and publish docker image to ghcr
name: launch3d
on:
push:
tags:
- "v*"
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
TAG: ${{ github.ref_name }}
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: ${{ github.repository }}
HOSTNAME: localhost
NEXT_PUBLIC_SLURM_GPU_OPTIONS: "1,2,4"
NEXT_PUBLIC_SLURM_MAX_CPUS: "256"
NEXT_PUBLIC_STORAGE_PATH: "/ibira"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build app image
run: docker build -t $REGISTRY/$IMAGE_NAME:$TAG --build-arg NEXT_PUBLIC_SLURM_GPU_OPTIONS=$NEXT_PUBLIC_SLURM_GPU_OPTIONS --build-arg NEXT_PUBLIC_SLURM_MAX_CPUS=$NEXT_PUBLIC_SLURM_MAX_CPUS --build-arg NEXT_PUBLIC_STORAGE_PATH=$NEXT_PUBLIC_STORAGE_PATH .
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image
run: docker push $REGISTRY/$IMAGE_NAME:$TAG