Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push to dockerhub #63

Merged
merged 16 commits into from
Mar 21, 2022
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,57 @@ 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: 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)) }}
push: true
uploadstandalone:
jburel marked this conversation as resolved.
Show resolved Hide resolved
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
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