-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 👷 Try to add GitHub action for CI * 🔧 Add env vars to GitHub action * ♻️ Deduplicate and simplify build * 🐳 Add Docker deploy to GitHub action * 🔒 Add Docker auth for deploy * 👷 Disable Travis, keep backup
- Loading branch information
Showing
9 changed files
with
111 additions
and
10 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,44 @@ | ||
name: Deploy Docker Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
image: | ||
- name: latest | ||
python_version: "3.8" | ||
- name: python3.8 | ||
python_version: "3.8" | ||
- name: python3.7 | ||
python_version: "3.7" | ||
- name: python3.6 | ||
python_version: "3.6" | ||
- name: python3.8-alpine3.10 | ||
python_version: "3.8" | ||
- name: python3.7-alpine3.8 | ||
python_version: "3.7" | ||
- name: python3.6-alpine3.8 | ||
python_version: "3.6" | ||
fail-fast: true | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.7" | ||
- name: Install Dependencies | ||
run: python3.7 -m pip install docker pytest | ||
- name: Deploy Image | ||
run: bash scripts/build-push.sh | ||
env: | ||
NAME: ${{ matrix.image.name }} | ||
DOCKERFILE: ${{ matrix.image.dockerfile }} | ||
PYTHON_VERSION: ${{ matrix.image.python_version }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
2 changes: 2 additions & 0 deletions
2
.github/workflows/main.yml → .github/workflows/issue-manager.yml
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,3 +1,5 @@ | ||
name: Issue Manager | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
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,42 @@ | ||
name: Test Docker Images | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
image: | ||
- name: latest | ||
python_version: "3.8" | ||
- name: python3.8 | ||
python_version: "3.8" | ||
- name: python3.7 | ||
python_version: "3.7" | ||
- name: python3.6 | ||
python_version: "3.6" | ||
- name: python3.8-alpine3.10 | ||
python_version: "3.8" | ||
- name: python3.7-alpine3.8 | ||
python_version: "3.7" | ||
- name: python3.6-alpine3.8 | ||
python_version: "3.6" | ||
fail-fast: true | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.7" | ||
- name: Install Dependencies | ||
run: python3.7 -m pip install docker pytest | ||
- name: Test Image | ||
run: bash scripts/test.sh | ||
env: | ||
NAME: ${{ matrix.image.name }} | ||
DOCKERFILE: ${{ matrix.image.dockerfile }} | ||
PYTHON_VERSION: ${{ matrix.image.python_version }} |
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
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
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
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
use_tag="tiangolo/uvicorn-gunicorn:$NAME" | ||
|
||
DOCKERFILE="$NAME" | ||
|
||
if [ "$NAME" == "latest" ] ; then | ||
DOCKERFILE="python3.8" | ||
fi | ||
|
||
docker build -t "$use_tag" --file "./docker-images/${DOCKERFILE}.dockerfile" "./docker-images/" |
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin |
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,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
use_tag="tiangolo/uvicorn-gunicorn:$NAME" | ||
|
||
DOCKERFILE=${DOCKERFILE-$NAME} | ||
|
||
docker build -t "$use_tag" --file "./docker-images/${DOCKERFILE}.dockerfile" "./docker-images/" | ||
bash scripts/build.sh | ||
pytest tests |