Skip to content

Commit

Permalink
Merge branch 'master' into B4nner
Browse files Browse the repository at this point in the history
  • Loading branch information
SlyPex committed Jul 20, 2024
2 parents e7fa1cd + 6f5c613 commit fa113c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/deployability_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ else
echo "deploy_env=Dockerfile" >> $GITHUB_OUTPUT
exit 0
fi
else
echo "[*] This Challenge is not deployable"
exit 1
fi
fi
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
workflow_dispatch:
######################
jobs:
test:
name: 'Test Challenge Structure'
Expand All @@ -26,6 +27,8 @@ jobs:
- name: Test Challenge directory structure
run: .github/scripts/chall_structure_validator.py ${{github.head_ref}}

######################

test_deployability:
name: 'Check Deployability'
defaults:
Expand All @@ -48,15 +51,17 @@ jobs:

- name: 'Check Output'
run: echo "${{steps.deployable.outputs.deploy_env}}"

######################

build_dockerfile:
name: 'Build Challenge Container using Dockerfile'
needs: test_deployability
if: ${{needs.test_deployability.outputs.deploy_env}} == 'Dockerfile'
defaults:
run:
shell: bash
runs-on: ubuntu-latest
needs: test_deployability
if: ${{needs.test_deployability.outputs.deploy_env}} == 'Dockerfile'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -75,15 +80,16 @@ jobs:
- name: Check Running Container
run: docker ps -a


######################

build_docker-compose:
name: 'Build Challenge Container using Docker Compose'
needs: test_deployability
if: ${{ needs.test_deployability.outputs.deploy_env }} == 'docker-compose'
defaults:
run:
shell: bash
runs-on: ubuntu-latest
needs: test_deployability
if: ${{ needs.test_deployability.outputs.deploy_env }} == 'docker-compose'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit fa113c5

Please sign in to comment.