Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update license copyright year to 2024 #136

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/functional-tests-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
version: ["3.1.2", "3.0-rc1", "3.1-rc1", "3.1.1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup COBOL
uses: ./
with:
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
name: Create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changelog
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Security

on: # yamllint disable-line rule:truthy
pull_request: {}
push:
branches:
- main

defaults:
run:
shell: sh

jobs:
code-scanning:
name: Code scanning
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "javascript"
- name: Perform CodeQL Analysis
id: codeql-analysis
uses: github/codeql-action/analyze@v3
- name: Upload to GHAS
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
category: "code-scanning"
sarif_file: "${{ steps.codeql-analysis.outputs.sarif-output }}"
directory-scanning:
name: Directory scanning
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Scan current project
id: scan-directory
uses: anchore/scan-action@v3
with:
by-cve: "true"
path: "."
- name: Upload to GHAS
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
category: "directory-scanning"
sarif_file: "${{ steps.scan-directory.outputs.sarif }}"
3 changes: 2 additions & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
name: Sync labels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Run Label Syncer
uses: micnncim/action-label-syncer@v1
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/update-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: FantasticFiasco/action-update-license-year@v3
- name: Update LICENSE file
uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
assignees: ${{ github.repository_owner }}
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
default_install_hook_types: ["pre-commit", "pre-push"]
default_stages: ["commit", "push"]
exclude: ^\.gitleaks\.toml$
minimum_pre_commit_version: 2.18.0
repos:
# Security
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Yevhen Fabizhevskyi
Copyright (c) 2020-2024 Yevhen Fabizhevskyi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
![GitHub release](https://img.shields.io/github/v/release/fabasoad/setup-cobol-action?include_prereleases)
![functional-tests-local](https://github.com/fabasoad/setup-cobol-action/actions/workflows/functional-tests-local.yml/badge.svg)
![functional-tests-remote](https://github.com/fabasoad/setup-cobol-action/actions/workflows/functional-tests-remote.yml/badge.svg)
![pre-commit](https://github.com/fabasoad/setup-cobol-action/actions/workflows/pre-commit.yml/badge.svg)
![security](https://github.com/fabasoad/setup-cobol-action/actions/workflows/security.yml/badge.svg)
![linting](https://github.com/fabasoad/setup-cobol-action/actions/workflows/linting.yml/badge.svg)

This action sets up a [GnuCOBOL](https://en.wikipedia.org/wiki/COBOL) programming
language.
Expand Down
23 changes: 13 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ runs:
using: "composite"
steps:
- name: Fail
uses: actions/github-script@v7
if: ${{ runner.os != 'Linux' }}
with:
script: core.setFailed('${{ runner.os }} ${{ runner.arch }} is not supported');
shell: sh
run: |
echo "::error::${RUNNER_OS} ${RUNNER_ARCH} is not supported"
exit 1
- name: Collect info
id: info
if: ${{ runner.os == 'Linux' }}
shell: sh
run: |
COBOL_INSTALLED=$(if command -v cobc >/dev/null 2>&1; then echo true; else echo false; fi)
echo "COBOL_INSTALLED=$COBOL_INSTALLED" >> $GITHUB_OUTPUT
mkdir -p "$GITHUB_WORKSPACE/cobol"
echo "COBOL_PATH=$GITHUB_WORKSPACE/cobol" >> $GITHUB_OUTPUT
shell: sh
echo "COBOL_INSTALLED=${COBOL_INSTALLED}" >> "$GITHUB_OUTPUT"
mkdir -p "${GITHUB_WORKSPACE}/cobol"
echo "COBOL_PATH=${GITHUB_WORKSPACE}/cobol" >> "$GITHUB_OUTPUT"
- name: Install COBOL
if: ${{ runner.os == 'Linux' && steps.info.outputs.COBOL_INSTALLED == 'false' }}
env:
INPUT_VERSION: "${{ inputs.version }}"
shell: sh
run: |
sudo apt-get update
sudo apt-get -y install curl tar libncurses5-dev libgmp-dev libdb-dev
Expand All @@ -37,10 +41,9 @@ runs:

# download and install open-cobol for dependencies (libcob >= 4.0)
sudo apt-get -y install ranger autoconf build-essential
curl -sLk https://sourceforge.net/projects/open-cobol/files/gnu-cobol/"$(echo "${{ inputs.version }}" | cut -b1- | cut -b-3)"/gnucobol-"${{ inputs.version }}".tar.gz | tar xz
cd gnucobol-"${{ inputs.version }}" && ./configure --prefix=/usr && sudo make && sudo make install && sudo ldconfig && cd /tmp/ && sudo rm -rf ./*
curl -sLk https://sourceforge.net/projects/open-cobol/files/gnu-cobol/"$(echo "${INPUT_VERSION}" | cut -b1- | cut -b-3)"/gnucobol-"${INPUT_VERSION}".tar.gz | tar xz
cd gnucobol-"${INPUT_VERSION}" && ./configure --prefix=/usr && sudo make && sudo make install && sudo ldconfig && cd /tmp/ && sudo rm -rf ./*
sudo apt-get -y --purge autoremove

echo "/home/cobol" >> $GITHUB_PATH
shell: sh
working-directory: ${{ steps.info.outputs.COBOL_PATH }}