Build docker image in CI (#221)

* Build docker image in CI

* Build docker image on any branch temporarely

* Update github actions

* Update github actions

* Update github actions

* Update github actions

* Update github actions

* Update readme

* Update github actions
This commit is contained in:
Nameless 2021-04-26 21:26:21 +03:00 committed by GitHub
parent e473ae7d47
commit da1f1d3514
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 3 deletions

View file

@ -31,3 +31,16 @@ jobs:
- name: Check formatting and run linters - name: Check formatting and run linters
run: | run: |
sh check.sh sh check.sh
- name: build and deploy master image to ghcr.io
# if: ${{ github.ref == 'refs/heads/master' }}
env:
PKG_TOKEN: ${{ secrets.PKG_TOKEN }}
USERNAME: ${{ github.actor }}
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
git_branch="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
echo ${PKG_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
docker build -t ghcr.io/${USERNAME}/tg:${git_branch}-${git_hash} -t ghcr.io/${USERNAME}/tg:latest .
docker push ghcr.io/${USERNAME}/tg:${git_branch}-${git_hash}
docker push ghcr.io/${USERNAME}/tg:latest

View file

@ -1,4 +1,4 @@
FROM python:3.8.3-slim-buster FROM python:3.9.4-slim-buster
RUN pip install tg RUN pip install tg

View file

@ -61,6 +61,13 @@ pip3 install tg
tg tg
``` ```
### Homebrew
```sh
brew tap paul-nameless/homebrew-repo
brew install tg
```
### From sources ### From sources
This option is recommended for development: This option is recommended for development:
@ -75,10 +82,10 @@ tg
### Using Docker ### Using Docker
> Please note that voice recordings and notifications won't work when using Docker. > Note that voice recordings and notifications won't work when using Docker.
```sh ```sh
docker run -it --rm tg docker run -it --rm ghcr.io/paul-nameless/tg
``` ```
### From the AUR ### From the AUR