Skip to content

Commit 2475cb1

Browse files
authored
Build and push docker container to github packages (#260)
* build and push docker container to github packages * dont ask questions. * only push on master.
1 parent 101628d commit 2475cb1

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/docker.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Create and publish a package
2+
on:
3+
push:
4+
branches: [ master ]
5+
jobs:
6+
build-and-push-image:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
12+
- name: Build container image
13+
uses: docker/build-push-action@v1
14+
with:
15+
username: ${{ github.actor }}
16+
password: ${{ secrets.GITHUB_TOKEN }}
17+
registry: docker.pkg.github.com
18+
repository: ${{ github.repository }}/base
19+
tag_with_sha: true
20+
tag_with_ref: true

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:20.04
2+
ENV DEBIAN_FRONTEND=noninteractive
23
RUN apt-get update
3-
RUN apt-get install -y software-properties-common python3 python3-setuptools
4+
RUN apt-get install -y software-properties-common python3-pip
45
RUN add-apt-repository ppa:gijzelaar/snap7
56
RUN apt-get update
67
RUN apt-get install -y libsnap7-dev libsnap7-1
78
ADD . /code
89
WORKDIR /code
9-
RUN python3 ./setup.py install
10+
RUN pip3 install .

0 commit comments

Comments
 (0)