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

ci: fix avoid pushing to docker registry #1680

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 9 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- run: |
echo "PIP_TAG='[devel]'" >> $GITHUB_ENV
- name: Upload to Github Docker Registry
uses: elgohr/Publish-Docker-Github-Action@3.02
with:
name: jina-ai/jina/jina
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.pkg.github.com
dockerfile: Dockerfiles/pip.Dockerfile
buildargs: PIP_TAG
buildoptions: ${{ matrix.build_option }}
tags: test-pip${{env.GITHUB_RUN_ID}}
- id: set-matrix
run: |
sudo apt-get install jq
Expand All @@ -99,13 +86,17 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

docker-image-test:
needs: prep-testbed
needs: commit-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: |
echo "PIP_TAG='[devel]'" >> $GITHUB_ENV
- run: |
docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
docker pull docker.pkg.github.com/jina-ai/jina/jina:test-pip${{env.GITHUB_RUN_ID}}
docker run docker.pkg.github.com/jina-ai/jina/jina:test-pip${{env.GITHUB_RUN_ID}} hello-world
docker build -f Dockerfiles/pip.Dockerfile -t jinaai/jina:test-pip .
docker run jinaai/jina:test-pip hello-world
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -126,9 +117,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Prepare enviroment
run: |
docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
docker pull docker.pkg.github.com/jina-ai/jina/jina:test-pip${{env.GITHUB_RUN_ID}}
docker tag docker.pkg.github.com/jina-ai/jina/jina:test-pip${{env.GITHUB_RUN_ID}} jinaai/jina:test-pip
docker build -f Dockerfiles/pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
pip install ".[cicd,test,daemon]" --no-cache-dir
jina check
Expand Down