File tree Expand file tree Collapse file tree 6 files changed +33
-12
lines changed Expand file tree Collapse file tree 6 files changed +33
-12
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ jobs:
2626 strategy :
2727 fail-fast : false
2828 matrix :
29- version : ["3.2 ", "3.1. 2", "3.1.1 "]
29+ version : ["4.0 ", "3.2", "3.1.2 "]
3030 runs-on : ubuntu-latest
3131 steps :
3232 - name : Checkout ${{ github.repository }}
33- uses : actions/checkout@v4
33+ uses : actions/checkout@v5
3434 - name : Setup COBOL
3535 uses : ./
3636 with :
5050 force : ["true", "false"]
5151 steps :
5252 - name : Checkout ${{ github.repository }}
53- uses : actions/checkout@v4
53+ uses : actions/checkout@v5
5454 - name : Setup COBOL 1
5555 id : setup-cobol-1
5656 uses : ./
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ on: # yamllint disable-line rule:truthy
66 push :
77 branches :
88 - main
9+ workflow_dispatch :
10+ inputs :
11+ security-type :
12+ description : What Security scanning you would like to run?
13+ required : false
14+ default : " all"
15+ type : choice
16+ options : ["all", "sca", "code-scanning"]
917
1018jobs :
1119 sast :
1523 security-events : write
1624 uses : fabasoad/reusable-workflows/.github/workflows/wf-security-sast.yml@main
1725 with :
18- code-scanning : true
19- sca : true
26+ code-scanning : ${{ (inputs.security-type || 'all') == 'all' || inputs.security-type == 'code-scanning' }}
27+ sca : ${{ (inputs.security-type || 'all') == 'all' || inputs.security-type == 'sca' }}
Original file line number Diff line number Diff line change 11---
22default_install_hook_types : ["pre-commit", "pre-push"]
33default_stages : ["pre-commit", "pre-push"]
4- minimum_pre_commit_version : 2.18 .0
4+ minimum_pre_commit_version : 4.0 .0
55repos :
66 # Linting
77 - repo : local
1313 types : [text]
1414 args : []
1515 # https://github.com/prettier/prettier/releases
16- additional_dependencies : ["prettier@3.4 .2"]
16+ additional_dependencies : ["prettier@3.6 .2"]
1717 stages : ["pre-commit"]
1818 # Security
1919 - repo : https://github.com/Yelp/detect-secrets
Original file line number Diff line number Diff line change 5353 name: Setup
5454 runs-on: ubuntu-latest
5555 steps:
56- - uses: actions/checkout@v4
56+ - uses: actions/checkout@v5
5757 - uses: fabasoad/setup-cobol-action@v1
5858 - name: Run script
5959 run: |
Original file line number Diff line number Diff line change 1- #! /usr/bin/env bash
1+ #! /usr/bin/env sh
2+
3+ SCRIPT_PATH=$( realpath " $0 " )
4+ SRC_DIR_PATH=$( dirname " $SCRIPT_PATH " )
5+ LIB_DIR_PATH=" ${SRC_DIR_PATH} /lib"
6+
7+ . " ${LIB_DIR_PATH} /logging.sh"
28
39main () {
410 input_version=" ${1} "
511 bin_path=" ${2} "
12+ minor_version=" $( echo " ${input_version} " | cut -b1- | cut -b-3) "
613
714 sudo apt-get update
15+ if [ " ${minor_version} " = " 4.0" ]; then
16+ log_info " Installing cobc ${minor_version} from the apt-get"
17+ sudo apt-get install -y gnucobol4
18+ exit 0
19+ fi
20+
21+ log_info " Installing cobc ${minor_version} from the source code"
822 sudo apt-get -y install curl tar libncurses5-dev libgmp-dev libdb-dev
923 sudo apt-get -y autoremove
1024 sudo apt-get -y install iproute2
@@ -13,8 +27,8 @@ main() {
1327 sudo apt-get -y install ranger autoconf build-essential
1428
1529 mkdir -p " ${bin_path} "
16- minor_version= " $( echo " ${input_version} " | cut -b1- | cut -b-3 ) "
17- url= " https://sourceforge.net/projects/open-cobol/files/gnu-cobol/ ${minor_version} /gnucobol- ${input_version} .tar.gz "
30+ url= " https://sourceforge.net/projects/open-cobol/files/gnucobol/ ${minor_version} /gnucobol- ${input_version} .tar.gz "
31+ log_info " Downloading ${url} "
1832 curl -sLk " ${url} " -o " ${bin_path} /gnucobol.tar.gz"
1933 tar -xvf " ${bin_path} /gnucobol.tar.gz" -C " ${bin_path} " --strip-components 1
2034 rm -f " ${bin_path} /gnucobol.tar.gz"
Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22
3-
43# Validates string to be one of the possible values (emulating enum data type).
54# Parameters:
65# 1. (Required) Param name to display it correctly in the error message for the
You can’t perform that action at this time.
0 commit comments