Skip to content

Commit

Permalink
Build and push docker container to github packages (gijzelaerr#260)
Browse files Browse the repository at this point in the history
* build and push docker container to github packages

* dont ask questions.

* only push on master.
  • Loading branch information
gijzelaerr authored Mar 17, 2021
1 parent 101628d commit 2475cb1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Create and publish a package
on:
push:
branches: [ master ]
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build container image
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: ${{ github.repository }}/base
tag_with_sha: true
tag_with_ref: true
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y software-properties-common python3 python3-setuptools
RUN apt-get install -y software-properties-common python3-pip
RUN add-apt-repository ppa:gijzelaar/snap7
RUN apt-get update
RUN apt-get install -y libsnap7-dev libsnap7-1
ADD . /code
WORKDIR /code
RUN python3 ./setup.py install
RUN pip3 install .

0 comments on commit 2475cb1

Please sign in to comment.