Skip to content

Commit

Permalink
fix ci/cd build
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Jun 17, 2024
1 parent 9e1c6d3 commit 5f81454
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/dockerimg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
# use_docs (use_docs are built on readthedocs any way)
- 'use_docs/*'

env:
OKD_URL: https://okd.hbp.eu:443

jobs:
build-docker-img:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,28 +76,10 @@ jobs:
echo "Pushing $DOCKER_IMGSTREAM"
docker push $DOCKER_IMGSTREAM
deploy-on-okd:
deploy-via-rancher:
needs: [ build-docker-img ]
if: success()
runs-on: ubuntu-latest
steps:
- name: "Configure image stream"
run: |
if [[ "$GITHUB_REF" == "refs/heads/master" ]]
then
echo "IMAGE_STREAM_TAG=docker-registry.default.svc:5000/voluba/voluba-img-deploy:latest" >> $GITHUB_ENV
fi
if [[ "$GITHUB_REF" == "refs/heads/staging" ]]
then
echo "IMAGE_STREAM_TAG=docker-registry.default.svc:5000/voluba/voluba-stg-img-deploy:staging" >> $GITHUB_ENV
fi
- name: "Login via cli"
run: |
if [[ ! -z "$IMAGE_STREAM_TAG" ]]
then
oc login ${{ env.OKD_URL }} --token=${{ secrets.OKD_SECRET }}
oc project voluba
oc import-image $IMAGE_STREAM_TAG
else
echo "Empty IMAGE_STREAM_TAG, skipping"
fi
- name: "echo"
run: echo "foo bar"

0 comments on commit 5f81454

Please sign in to comment.