-
-
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.
* †追加† 設定ファイルを環境変数のコンテンツから見るようになった * †追加† 多分Docker imagesにpushできるようになった * †追加† Dockerで動くようになった * †編集† Alpineイメージじゃなくてpython:3.8.5-busterイメージにお世話になるようにした * †修正† dockerignoreファイルのファイル末改行を修正した (suggestionより) Co-authored-by: Naoki Ikeguchi <[email protected]> Co-authored-by: Naoki Ikeguchi <[email protected]>
- Loading branch information
Showing
6 changed files
with
68 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,5 @@ | ||
venv/ | ||
.git | ||
.github | ||
.gitignore | ||
.idea |
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,36 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
# Publish `master` as Docker `latest` image. | ||
branches: | ||
- master | ||
|
||
# Publish `v1.2.3` tags as releases. | ||
tags: | ||
- v* | ||
|
||
env: | ||
IMAGE_NAME: delitter | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build an image with a tag | ||
run: docker build -t app . | ||
|
||
- name: Log into the registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Push the image | ||
run: | | ||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
[ "$VERSION" == "master" ] && VERSION=latest | ||
docker tag app $IMAGE_ID:$VERSION | ||
docker push $IMAGE_ID:$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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM python:3.8.5-buster | ||
RUN mkdir /src | ||
COPY . /src | ||
WORKDIR /src | ||
RUN python3 -m pip install -r requirements.txt | ||
|
||
ENTRYPOINT ["python3", "main.py"] |
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