|
@@ -8,7 +8,7 @@ jobs:
|
|
|
name: Build new images
|
|
|
runs-on: ubuntu-latest
|
|
|
outputs:
|
|
|
- joystream_node_tag: ${{ steps.select_image_tag.outputs.tag }}
|
|
|
+ joystream_node_tag: ${{ steps.docker_build.outputs.tag }}
|
|
|
steps:
|
|
|
- uses: actions/checkout@v1
|
|
|
- name: Login to DockerHub
|
|
@@ -16,12 +16,15 @@ jobs:
|
|
|
with:
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
- - id: select_image_tag
|
|
|
- name: Build docker images
|
|
|
+ # TODO: Try to not build a new image: compute a hash over rust code and use that as the docker
|
|
|
+ # image tag. (Normally this would be the git repo commit hash but the monorepo contains multiple projects
|
|
|
+ # that is why it is not effective.)
|
|
|
+ - id: docker_build
|
|
|
+ name: Build and publish docker images
|
|
|
run: |
|
|
|
- export JOYSTREAM_NODE_TAG=$GITHUB_REF
|
|
|
- echo "DEBUG: JOYSTREAM_NODE_TAG=${JOYSTREAM_NODE_TAG}"
|
|
|
docker-compose build
|
|
|
+ export JOYSTREAM_NODE_TAG=`docker run joystream/node --version | sed -e 's/^joystream-node //' | tr -d '\n' | tr -d '\r'`
|
|
|
+ docker image tag joystream/node joystream/node:${JOYSTREAM_NODE_TAG}
|
|
|
docker push joystream/node:${JOYSTREAM_NODE_TAG}
|
|
|
echo "::set-output name=tag::${JOYSTREAM_NODE_TAG}"
|
|
|
|