This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
forked from iot-salzburg/gpu-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.63 KB
/
default.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
name: Docker Build
on:
push:
branches:
- v1.5_cuda-12.0_ubuntu-22.04
env:
IMAGE: deepset/gpu-jupyter
BASE_TAG: v1.5_cuda-12.0_ubuntu-22.04_slim
SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
DOCKER_HUB_PUSH_USER: ${{ secrets.DC_DOCKER_HUB_PUSH_USER }}
DOCKER_HUB_PUSH_TOKEN: ${{ secrets.DC_DOCKER_HUB_PUSH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest-4-cores
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- name: Generate Dockerfile
run: ./generate-Dockerfile.sh --slim
- name: Login to DockerHub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ env.DOCKER_HUB_PUSH_USER }}
password: ${{ env.DOCKER_HUB_PUSH_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325
- name: Docker metadata
id: metadata
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
with:
images: ${{ env.IMAGE }}
tags: |
type=raw,value=${{ env.BASE_TAG }}-${{ env.SHA }}
type=raw,value=${{ env.BASE_TAG }}-latest
- name: Build and push container image
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
with:
context: .build
builder: ${{ steps.buildx.outputs.name }}
tags: ${{ steps.metadata.outputs.tags }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max