Skip to content

Commit

Permalink
Merge pull request #68 from decidim/publish-to-dockerhub
Browse files Browse the repository at this point in the history
Publish images to Docker Hub through new Github workflow
  • Loading branch information
tramuntanal authored Dec 23, 2020
2 parents b99178f + ae8a9f2 commit fb4afcc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
docker tag $GENERATOR_IMAGE_NAME:$TAG $GENERATOR_IMAGE_NAME:latest
docker tag $GENERATOR_IMAGE_NAME:$TAG $GENERATOR_IMAGE_NAME:$DECIDIM_VERSION
- name: Publish Image to Github Container Registry
- name: Publish decidim-generator Image to Github Container Registry
uses: azure/docker-login@v1
with:
login-server: ghcr.io
Expand All @@ -66,6 +66,14 @@ jobs:
- run: |
docker push $GENERATOR_IMAGE_NAME
- name: Publish decidim-generator Image to Docker Hub
uses: docker/login-action@v1
with:
username: decidimbot
password: ${{ secrets.DOCKERHUB_PAT }}
- run: |
docker push $GENERATOR_IMAGE_NAME
- name: Build decidim-test Image
env:
RUBY_VERSION: ${{ steps.ruby-version.outputs.version }}
Expand All @@ -86,6 +94,14 @@ jobs:
- run: |
docker push $TEST_IMAGE_NAME
- name: Publish decidim-test Image to Docker Hub
uses: docker/login-action@v1
with:
username: decidimbot
password: ${{ secrets.DOCKERHUB_PAT }}
- run: |
docker push $TEST_IMAGE_NAME
- name: Build decidim-dev Image
env:
RUBY_VERSION: ${{ steps.ruby-version.outputs.version }}
Expand All @@ -106,6 +122,14 @@ jobs:
- run: |
docker push $DEV_IMAGE_NAME
- name: Publish decidim-dev Image to Docker Hub
uses: docker/login-action@v1
with:
username: decidimbot
password: ${{ secrets.DOCKERHUB_PAT }}
- run: |
docker push $DEV_IMAGE_NAME
- name: Build decidim (app) Image
env:
RUBY_VERSION: ${{ steps.ruby-version.outputs.version }}
Expand All @@ -125,3 +149,12 @@ jobs:
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- run: |
docker push $APP_IMAGE_NAME
- name: Publish decidim Image to Docker Hub
uses: docker/login-action@v1
with:
username: decidimbot
password: ${{ secrets.DOCKERHUB_PAT }}
- run: |
docker push $APP_IMAGE_NAME
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG ruby_version
ARG ruby_version=2.7.1

FROM ruby:${ruby_version}
LABEL maintainer="[email protected]"

ARG decidim_version
ARG decidim_version=0.23.1

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
Expand All @@ -20,6 +20,8 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
RUN npm install -g [email protected]

RUN gem install bundler --version '>= 2.1.4' \
&& gem install decidim:${decidim_version}
&& gem install decidim:${decidim_version} --no-document

ENTRYPOINT ["decidim"]
CMD ["decidim"]

ENTRYPOINT []
2 changes: 1 addition & 1 deletion Dockerfile-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG base_image=ghcr.io/decidim/decidim-generator:latest
FROM $base_image
LABEL maintainer="[email protected]"

ARG decidim_version
ARG decidim_version=0.23.1

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
Expand Down

0 comments on commit fb4afcc

Please sign in to comment.