From 4a37659416b16a4377e6e4b13fd5395b09c14aa1 Mon Sep 17 00:00:00 2001 From: Paige Rubendall Date: Wed, 3 Nov 2021 10:31:34 -0400 Subject: [PATCH] Adding docker image build and push to github actions --- .github/README.md | 5 +++++ .github/workflows/docker-image.yml | 31 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/README.md create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 00000000..077a4552 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,5 @@ +### CI Information + +Used the below youtube video and github actions step + +https://www.youtube.com/watch?v=-lI1LjhB_FE diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..8878dbaf --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,31 @@ +name: Docker Image CI +on: + push: + branches: ['master'] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Login in quay + run: docker login quay.io -u ${QUAY_USER} -p ${QUAY_TOKEN} + env: + QUAY_USER: ${{ secrets.QUAY_USER_1 }} + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN_1 }} + - name: Check out code + uses: actions/checkout@master + - name: Build the Docker images + run: docker build --no-cache -t quay.io/openshift-scale/kraken containers/ + - name: Push the Docker images + run: docker push quay.io/openshift-scale/kraken + - name: Remove Image + run: docker rmi -f quay.io/openshift-scale/kraken | exit 0 + - name: Build Kraken-hub Image + uses: convictional/trigger-workflow-and-wait@v1.5.0 + with: + owner: cloud-bulldozer + repo: kraken-hub + github_token: ${{ secrets.G_ACCESS_TOKEN }} + workflow_file_name: docker-image.yml + trigger_workflow: true + wait_workflow: true