Skip to content

Commit

Permalink
Merge pull request #507 from valory-xyz/chore/add-docker-ci
Browse files Browse the repository at this point in the history
chore: add CI workflow for releases
  • Loading branch information
DavidMinarsch authored Dec 27, 2022
2 parents deaef6b + 5a9b79f commit 860c6e0
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Images
# Controls when the action will run.
on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up tag
run: echo export TAG=$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh
- name: Build version tagged images
run: |
source env.sh
docker build -t valory/open-aea-docs:$TAG -f docs-image/Dockerfile . && \
docker build -t valory/open-aea-develop:$TAG -f develop-image/Dockerfile . && \
docker build -t valory/open-aea-user:$TAG -f user-image/Dockerfile . && \
docker build -t valory/open-aea-deploy:$TAG -f deploy-image/Dockerfile .
- name: Tag to latest
run: |
source env.sh
docker tag valory/open-aea-docs:$TAG valory/open-aea-docs:latest
docker tag valory/open-aea-develop:$TAG valory/open-aea-develop:latest
docker tag valory/open-aea-user:$TAG valory/open-aea-user:latest
docker tag valory/open-aea-deploy:$TAG valory/open-aea-deploy:latest
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Docker Push
run: |
source env.sh
docker push valory/open-aea-docs:$TAG
docker push valory/open-aea-docs:latest
docker push valory/open-aea-develop:$TAG
docker push valory/open-aea-develop:latest
docker push valory/open-aea-user:$TAG
docker push valory/open-aea-user:latest
docker push valory/open-aea-deploy:$TAG
docker push valory/open-aea-deploy:latest

0 comments on commit 860c6e0

Please sign in to comment.