diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25d158e7..405a9375 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,5 @@ name: Build Krkn on: - push: - branches: - - main pull_request: jobs: @@ -51,20 +48,4 @@ jobs: if-no-files-found: error - name: Check CI results run: grep Fail CI/results.markdown && false || true - - name: Build the Docker images - run: docker build --no-cache -t quay.io/redhat-chaos/krkn containers/ - - name: Login in quay - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - 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: Push the Docker images - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - run: docker push quay.io/redhat-chaos/krkn - - name: Rebuild krkn-hub - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - uses: redhat-chaos/actions/krkn-hub@main - with: - QUAY_USER: ${{ secrets.QUAY_USER_1 }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN_1 }} + diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..cd0a16fc --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,30 @@ +name: Docker Image CI +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Build the Docker images + run: docker build --no-cache -t quay.io/redhat-chaos/krkn containers/ + - name: Login in quay + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + 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: Push the Docker images + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: docker push quay.io/redhat-chaos/krkn + - name: Rebuild krkn-hub + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + uses: redhat-chaos/actions/krkn-hub@main + with: + QUAY_USER: ${{ secrets.QUAY_USER_1 }} + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN_1 }}