From 726e08f3b2b4250f0e039048c0f95cc07b9a6faa Mon Sep 17 00:00:00 2001 From: Oksana Shadura Date: Fri, 16 Feb 2024 16:50:24 +0100 Subject: [PATCH] Try to push to ghcr.io instead (i dont have permissions to push in dockerhub repo) --- .github/workflows/gh-ci.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index f651292..ab38249 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -64,6 +64,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Harbor Hub + if: success() && github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: hub.opensciencegrid.org + username: ${{ secrets.HARBOR_USER }} + password: ${{ secrets.HARBOR_PASSWORD }} + - name: Generate tags id: tags env: @@ -74,7 +82,7 @@ jobs: release: ${{ env.release }} python_latest: ${{ env.python_latest}} run: | - image="coffeateam/${image_dir}-${distro}" + image="ghcr.io/coffeateam/${image_dir}-${distro}" if [ ${image_dir} == 'coffea-base' ]; then tag="${image}:${releasev0}-py${python}" @@ -96,7 +104,7 @@ jobs: uses: docker/build-push-action@v5 with: load: true - tags: ${{ steps.tags.outputs.tag }} + tags: ${{ steps.tags.outputs.tags }} context: ${{ matrix.image_dir }} file: ${{ matrix.image_dir }}/Dockerfile.${{ matrix.distro }} build-args: | @@ -145,7 +153,7 @@ jobs: - name: Test Pytest environement CalVer if: ${{ matrix.image_dir != 'coffea-base' }} env: - tag: ${{ steps.tags.outputs.tag }} + tag: ${{ steps.tags.outputs.tags }} run: | docker run --rm -v ${{ github.workspace }}:/tmp/workspace ${tag} \ sh -c "pip install -U pytest && cd tmp/workspace && pytest -m calver"