mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Remove 3rd party action and use reusable workflow (#235)
This commit is contained in:
5
.github/workflows/README.md
vendored
5
.github/workflows/README.md
vendored
@@ -1,5 +0,0 @@
|
||||
### CI Information
|
||||
|
||||
Used the below youtube video and github actions step
|
||||
|
||||
https://www.youtube.com/watch?v=-lI1LjhB_FE
|
||||
35
.github/workflows/docker-image.yml
vendored
35
.github/workflows/docker-image.yml
vendored
@@ -2,35 +2,30 @@ name: Docker Image CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login in quay
|
||||
if: github.ref == 'refs/heads/master' && 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: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build the Docker images
|
||||
run: docker build --no-cache -t quay.io/chaos-kubox/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/master' && github.event_name == 'push'
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
run: docker push quay.io/chaos-kubox/krkn
|
||||
- name: Remove Image
|
||||
run: docker rmi -f quay.io/chaos-kubox/krkn | exit 0
|
||||
- name: Build Kraken-hub Image
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
uses: convictional/trigger-workflow-and-wait@v1.5.0
|
||||
with:
|
||||
owner: cloud-bulldozer
|
||||
repo: krkn-hub
|
||||
github_token: ${{ secrets.G_ACCESS_TOKEN }}
|
||||
workflow_file_name: docker-image.yml
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
- name: Rebuild krkn-hub
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
uses: chaos-kubox/actions./.github/workflows/krkn-hub.yml@main
|
||||
secrets:
|
||||
QUAY_USER: ${{ secrets.QUAY_USER_1 }}
|
||||
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN_1 }}
|
||||
Reference in New Issue
Block a user