From bcd2037885b2d9569af25e97f4deddccee04bd53 Mon Sep 17 00:00:00 2001 From: thomasyu888 Date: Tue, 15 Dec 2020 14:36:50 +0800 Subject: [PATCH] Push image to synapse --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe7e947..c300b8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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