Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Improved workflow and added catt to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Apipa169 committed Jul 1, 2020
1 parent 5f97f44 commit 325f469
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ jobs:
DOCKER_IMAGE=apipa169/assistant-relay
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
fi
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
fi
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}b$ ]]; then
TAGS="$TAGS --tag ${DOCKER_IMAGE}:beta"
fi
if [[ $VERSION === dev ]]; then
DOCKER_PLATFORMS=linux/amd64
fi
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${VERSION}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ ENV LANG C.UTF-8
ENV VERSION=$VERSION
ENV BUILD_DATE=$BUILD_DATE

RUN apt-get update \
&& apt-get install python3.6 \
&& pip3 install catt

RUN mkdir /assistant_relay \
&& npm i pm2 -g

Expand Down

0 comments on commit 325f469

Please sign in to comment.