Skip to content

Commit

Permalink
Merge pull request #63 from jburel/build
Browse files Browse the repository at this point in the history
Push to dockerhub
  • Loading branch information
jburel authored Mar 21, 2022
2 parents c1bfdd5 + 35afa24 commit 9f85a7d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 8 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,63 @@ jobs:
- uses: actions/checkout@v2
- name: Build
run: ./build.sh
upload:
needs: build
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
env:
name: openmicroscopy/omero-web
steps:
- name: Get other tags
id: gettags
uses: jupyterhub/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.name}}:"
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.name }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
tags: ${{ join(fromJson(steps.gettags.outputs.tags)) }}
labels: ${{ steps.meta.outputs.labels }}
push: true
uploadstandalone:
needs: upload
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
env:
name: openmicroscopy/omero-web-standalone
nameParent: openmicroscopy/omero-web:latest
folder: standalone
steps:
- uses: actions/checkout@v2
- name: Get other tags
id: gettags
uses: jupyterhub/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.name }}:"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
build-args: |
"PARENT_IMAGE=${{ env.nameParent }}"
context: ${{ env.folder }}
tags: ${{ join(fromJson(steps.gettags.outputs.tags)) }}
push: true
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM centos:centos7
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.created="unknown"
LABEL org.opencontainers.image.revision="unknown"
LABEL org.opencontainers.image.source="https://github.com/ome/omero-web-docker"


RUN mkdir /opt/setup
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ ifndef VERSION
endif

perl -i -pe 's/OMERO_VERSION=(\S+)/OMERO_VERSION=$(VERSION)/' Dockerfile
perl -i -pe 's/(org.opencontainers.image.created=)"([^"]+)"/$$1"$(RELEASE)"/' Dockerfile
perl -i -pe 's/(org.opencontainers.image.revision=)"([^"]+)"/$$1"$(COMMIT)"/' Dockerfile

ifndef BUILD
git commit -a -m "Bump OMERO_VERSION to $(VERSION)"
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
REPO="${REPO:-test}"
fi
IMAGE=$REPO/omero-web:$PREFIX
STANDLONE=$REPO/omero-web-standalone:$PREFIX
STANDALONE=$REPO/omero-web-standalone:$PREFIX

CLEAN=${CLEAN:-y}

Expand Down Expand Up @@ -40,7 +40,7 @@ docker run -d --name $PREFIX-web \
-e CONFIG_omero_web_server__list='[["omero.example.org", 4064, "test-omero"]]' \
-e CONFIG_omero_web_debug=true \
-p 4080:4080 \
$STANDLONE
$STANDALONE

bash test_getweb.sh

Expand All @@ -49,4 +49,4 @@ if [ -n "${DOCKER_USERNAME:-}" ]; then
make VERSION="$PREFIX" REPO="$REPO" docker-push
else
echo Docker push disabled
fi
fi

0 comments on commit 9f85a7d

Please sign in to comment.