-
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.
- Loading branch information
1 parent
e581fbc
commit 72e9bcd
Showing
12 changed files
with
106 additions
and
0 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,56 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Publish Docker image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registries: | ||
name: Push Docker image to multiple registries | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
environment: DEV | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
# my-docker-hub-namespace/my-docker-hub-repository | ||
images: | | ||
ghcr.io/${{ github.repository }} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
file: docker/Dockerfile | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
File renamed without changes.
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 @@ | ||
# when type checking dependents, tell type checkers to use this package's types |
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,10 @@ | ||
FROM python:3.11.1-slim-buster | ||
WORKDIR /app | ||
ENV PIP_NO_CACHE_DIR=off | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONIOENCODING=utf-8 | ||
ENV PATH="/root/.local/bin:${PATH}" | ||
RUN python -m pip install --no-cache-dir --upgrade pip --quiet && \ | ||
python -m pip install --user pipx && python -m pipx ensurepath && \ | ||
pipx install "dedlin>=1.12.0" | ||
ENTRYPOINT ["dedlin"] |
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,18 @@ | ||
FROM python:3.11.1-slim-buster | ||
WORKDIR /app | ||
ENV PIP_NO_CACHE_DIR=off | ||
ENV PYTHONUNBUFFERED=1 | ||
# multidict doesnt have pre-compiled things for many OSs | ||
ENV MULTIDICT_NO_EXTENSIONS=1 | ||
# RUN apk add --no-cache linux-headers==4.19.36-r0 wget | ||
ENV PATH="/root/.local/bin:${PATH}" | ||
RUN python -m pip install --user pipx && python -m pipx ensurepath | ||
# RUN python3 -m pipx ensurepath | ||
# isort depends on pylint | ||
RUN pipx install isort && \ | ||
pipx install pylint | ||
RUN python -m pip install --no-cache-dir --upgrade pip --quiet \ | ||
&& pip install pipenv --no-cache-dir --quiet | ||
COPY dist/so_pip-*-py3-none-any.whl /app/ | ||
RUN pipenv install so_pip-*.whl --skip-lock | ||
ENTRYPOINT ["pipenv", "run", "so_pip"] |
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,3 @@ | ||
cd .. | ||
docker build -t so_pip -f docker/Dockerfile . | ||
cd docker |
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,7 @@ | ||
#!/bin/bash | ||
|
||
# If you you gitbash, to use tflint, etc docker version, you need this. | ||
( | ||
export MSYS_NO_PATHCONV=1 | ||
"docker.exe" "$@" | ||
) |
File renamed without changes.
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,7 @@ | ||
#!/bin/bash | ||
|
||
# If you you gitbash, to use tflint, etc docker version, you need this. | ||
( | ||
export MSYS_NO_PATHCONV=1 | ||
"winpty" "docker.exe" "$@" | ||
) |
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,2 @@ | ||
. ../.env | ||
./dockerw.sh login --username=matthewdeanmartin --password "$DOCKER_PASSWORD" |
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 @@ | ||
./docker.sh run --rm -i -v "$PWD/data:/data" so_pip:latest "$@" |
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 @@ | ||
./dockerw.sh run --rm -it -v "$PWD/data:/data" --entrypoint "bash" so_pip:latest |