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
/* | |
One thing I like in like in languages like python and perl | |
is you can logically OR a series of values and it the | |
expression will result in the first one that is 'non null' | |
or 'true'. This facility is missing in C++ as the logical | |
or operator(||) produces a boolean. | |
One thing to be cautious of, is that in python and perl | |
evalution of the OR'd expressions stops on the first one | |
that is true, any further expressions are not evalutated, |
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: Build | |
on: push | |
jobs: | |
RedHat: | |
runs-on: ubuntu-latest | |
container: docker.io/andrewofc/redhatbuilder | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 |
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
#! /usr/bin/python | |
# | |
# script to validate .gitlab-ci.yml | |
# | |
import sys | |
import requests | |
import json | |
def main(): | |
r = requests.post("https://gitlab.example.com/api/v4/ci/lint", json={ 'content': file(sys.argv[1], 'r').read() }) |