forked from gijzelaerr/python-snap7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and push docker container to github packages (gijzelaerr#260)
* build and push docker container to github packages * dont ask questions. * only push on master.
- Loading branch information
1 parent
101628d
commit 2475cb1
Showing
2 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |