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 docker image to Synapse #58

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=nlpsandbox/date-annotator-example
# Must create your own Synapse project first
# Should we make dockerimage here a secret?
DOCKER_IMAGE=docker.synapse.org/syn22277124/date-annotator-example
VERSION=noop
PUSH=false
if [ "${{ github.event_name }}" = "schedule" ]; then
Expand Down Expand Up @@ -91,12 +93,20 @@ jobs:
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: steps.prep.outputs.push == 'true'
# - name: Login to DockerHub
# if: steps.prep.outputs.push == 'true'
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.synapse.org
username: ${{ secrets.SYNAPSE_USERNAME }}
password: ${{ secrets.SYNAPSE_PASSWORD }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -112,10 +122,10 @@ jobs:
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.name }}
- name: Docker Hub Description
if: steps.prep.outputs.push == 'true'
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: nlpsandbox/date-annotator-example
# - name: Docker Hub Description
# if: steps.prep.outputs.push == 'true'
# uses: peter-evans/dockerhub-description@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
# repository: nlpsandbox/date-annotator-example