From 53cf6506a7f2461c2684027b95bf2dfeabfe34be Mon Sep 17 00:00:00 2001 From: binhex Date: Thu, 21 Oct 2021 22:23:00 +0100 Subject: [PATCH] push to gitlab --- .github/workflows/workflow-docker-manual.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-docker-manual.yml b/.github/workflows/workflow-docker-manual.yml index 9a9fcaa..9d89919 100644 --- a/.github/workflows/workflow-docker-manual.yml +++ b/.github/workflows/workflow-docker-manual.yml @@ -18,12 +18,18 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry + - name: Login to GitHub uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} + - name: Login to GitLab + uses: docker/login-action@v1 + with: + registry: registry.gitlab.com + username: ${{ secrets.GITLAB_USERNAME }} + password: ${{ secrets.GITLAB_TOKEN }} - name: Show Runners environment (debug) uses: nick-invision/retry@v2.4.0 with: @@ -58,6 +64,8 @@ jobs: --tag ${{ github.repository }}:${{ github.event.inputs.tags }} \ --tag ghcr.io/${{ github.repository }}:${{ steps.generate_temporary_tag_name.outputs.test_tag }} \ --tag ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} \ + --tag registry.gitlab.com/${{ github.repository }}:${{ steps.generate_temporary_tag_name.outputs.test_tag }} \ + --tag registry.gitlab.com/${{ github.repository }}:${{ github.event.inputs.tags }} \ . - name: Run Tests shell: bash @@ -82,4 +90,12 @@ jobs: max_attempts: 3 retry_wait_seconds: 120 command: | - docker push ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} \ No newline at end of file + docker push ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} + - name: Push Docker image to GitLab Container Registry (GCR) + uses: nick-invision/retry@v2.4.0 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_wait_seconds: 120 + command: | + docker push registry.gitlab.com/${{ github.repository }}:${{ github.event.inputs.tags }} \ No newline at end of file