Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Jul 24, 2024
1 parent 830daea commit 64d71d0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/buiild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and publish image to ghcr.io/epics-containers

on:
push:
pull_request:

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Determine container image tag to use
id: tag
run: |
# tag is branch name or tag if there is a tag
echo ::set-output name=image_tag::${GITHUB_REF##*/}
echo ::set-output name=do_push::true
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io/epics-containers
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Build developer image
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
push: ${{ steps.tag.outputs.do_push }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.image_tag }}
# - name: Build runtime image
# uses: docker/build-push-action@v5
# with:
# builder: ${{ steps.buildx.outputs.name }}
# push: ${{ steps.tag.outputs.do_push }}
# tags: |
# ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.image_tag }}.run
# target: runtime
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache

8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.11

RUN python -mvenv /venv
ENV PATH=/venv/bin:$PATH

# don't use numpy 2.0 yet, pin to latest 1.x version
RUN pip install numpy=1.26.4 p4p nose2

0 comments on commit 64d71d0

Please sign in to comment.