Update c-cpp.yml #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C CI | |
on: [push, pull_request] | |
jobs: | |
analyzing-code: | |
runs-on: self-hosted | |
name: A job to check for vulnerabilities | |
steps: | |
- name: Simple test action | |
id: docker | |
uses: shovon0203/docker-action@main | |
with: | |
who-to-greet: 'Shovon!' | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Ensure dpkg is configured correctly | |
run: sudo dpkg --configure -a | |
- name: Set up build environment | |
run: sudo apt-get install -y gcc make | |
- name: Build | |
run: make | |
- name: Test executable | |
run: ./hello | |
outputs: | |
suspicious_activity: ${{ env.SUSPICIOUS_ACTIVITY }} | |
run-code: | |
runs-on: ubuntu-latest | |
needs: analyzing-code | |
steps: | |
- name: Manual approval | |
if: needs.analyzing-code.outputs.suspicious_activity == 'true' | |
uses: trstringer/manual-approval@v1 | |
with: | |
secret: ${{ github.TOKEN }} | |
approvers: shovon0203 | |
- name: Simple test action | |
id: docker | |
uses: shovon0203/docker-action@main | |
with: | |
who-to-greet: 'Shovon!' | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up build environment | |
run: sudo apt-get install -y gcc make | |
- name: Build | |
run: make | |
- name: Test executable | |
run: ./hello |