File tree Expand file tree Collapse file tree 3 files changed +69
-0
lines changed
Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches :
6+ - " dockerfile"
7+ - " main"
8+ tags :
9+ - " v*.*.*"
10+
11+ jobs :
12+ docker :
13+ if : ${{ github.repository == 'DiamondLightSource/python-zocalo' }}
14+ runs-on : ubuntu-latest
15+ steps :
16+ -
17+ name : Checkout
18+ uses : actions/checkout@v3
19+ -
20+ name : Set up QEMU
21+ uses : docker/setup-qemu-action@v2
22+ -
23+ name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v2
25+ # -
26+ # name: Login to Docker Hub
27+ # uses: docker/login-action@v2
28+ # with:
29+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
30+ # password: ${{ secrets.DOCKERHUB_TOKEN }}
31+ -
32+ name : Login to GitHub Container Registry
33+ uses : docker/login-action@v2
34+ with :
35+ registry : ghcr.io
36+ username : ${{ github.repository_owner }}
37+ password : ${{ secrets.GITHUB_TOKEN }}
38+ -
39+ name : Extract metadata (tags, labels) for Docker
40+ id : meta
41+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
42+ with :
43+ images : |
44+ ghcr.io/${{ github.repository }}
45+ tags : |
46+ type=edge,branch=main
47+ type=ref,event=branch
48+ type=semver,pattern={{version}}
49+ -
50+ name : Build and push
51+ uses : docker/build-push-action@v3
52+ with :
53+ context : .
54+ push : true
55+ tags : ${{ steps.meta.outputs.tags }}
56+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ FROM python:3.11-slim
2+
3+ WORKDIR /zocalo
4+
5+ RUN apt-get update && apt-get install -y curl
6+ RUN python -m pip install --upgrade pip
7+
8+ COPY . .
9+
10+ RUN python -m pip install --no-cache-dir .
11+
12+ CMD ["zocalo.service" ]
Original file line number Diff line number Diff line change 44
55Unreleased
66----------
7+ * Add Dockerfile and build-and-push-docker-image GitHub workflow
78
890.26.0 (2022-11-04)
910-------------------
You can’t perform that action at this time.
0 commit comments