forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.43 KB
/
docker.yml
File metadata and controls
51 lines (41 loc) · 1.43 KB
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
name: Build and push Docker images to Docker Hub
on:
workflow_dispatch:
release:
types: [published]
permissions: {}
jobs:
build_docker_image:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository == 'pybamm-team/PyBaMM'
name: Build image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
with:
cache-binary: false
- name: Login to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image to Docker Hub
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: scripts/Dockerfile
tags: pybamm/pybamm:latest
push: true
platforms: linux/amd64
no-cache: true
- name: List built image(s)
run: docker images