|
| 1 | +name: Publishing ready |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + build: |
| 5 | + name: Build |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Check out code |
| 9 | + uses: actions/checkout@v2 |
| 10 | + |
| 11 | + - name: Install useful utilities |
| 12 | + run: sudo apt-get install -y tree |
| 13 | + |
| 14 | + - name: Checking if LICENSE exists |
| 15 | + run: | |
| 16 | + FILE=LICENSE |
| 17 | + if [ -f "$FILE" ]; then |
| 18 | + echo "File "$FILE" exists." |
| 19 | + exit 0 |
| 20 | + else |
| 21 | + echo "File $FILE does not exist." |
| 22 | + exit 1 |
| 23 | + fi |
| 24 | +
|
| 25 | + - name: Checking if Apache License Version 2.0, January 2004 is being used |
| 26 | + run: | |
| 27 | + if grep --quiet "Apache License" LICENSE && grep --quiet "Version 2.0, January 2004" LICENSE; then |
| 28 | + echo "Using Apache License Version 2.0, January 2004" |
| 29 | + exit 0 |
| 30 | + else |
| 31 | + echo "Not using Apache License Version 2.0, January 2004" |
| 32 | + exit 1 |
| 33 | + fi |
| 34 | + |
| 35 | + - name: Checking if CONTRIBUTING guide exists |
| 36 | + run: | |
| 37 | + FILE=CONTRIBUTING.md |
| 38 | + if [ -f "$FILE" ]; then |
| 39 | + echo "File "$FILE" exists." |
| 40 | + exit 0 |
| 41 | + else |
| 42 | + echo "File $FILE does not exist." |
| 43 | + exit 1 |
| 44 | + fi |
| 45 | +
|
| 46 | + - name: Checking if README file exists |
| 47 | + run: | |
| 48 | + FILE=README.md |
| 49 | + if [ -f "$FILE" ]; then |
| 50 | + echo "File "$FILE" exists." |
| 51 | + exit 0 |
| 52 | + else |
| 53 | + echo "File $FILE does not exist." |
| 54 | + exit 1 |
| 55 | + fi |
| 56 | + |
| 57 | + - name: Checking if copyrighted to Pittsburgh Supercomputing Center |
| 58 | + run: | |
| 59 | + if grep --quiet "Pittsburgh Supercomputing Center. All Rights Reserved." README.md; then |
| 60 | + echo "Copyright (c) Pittsburgh Supercomputing Center" |
| 61 | + exit 0 |
| 62 | + else |
| 63 | + echo "No reference to Pittsburgh Supercomputing Center" |
| 64 | + exit 1 |
| 65 | + fi |
| 66 | +
|
| 67 | + - name: Checking if there exists at least one Singularity definition file |
| 68 | + run: | |
| 69 | + FILE=Singularity |
| 70 | + if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then |
| 71 | + echo "File "$FILE" was found."; |
| 72 | + exit 0 |
| 73 | + else |
| 74 | + echo "File "$FILE" was not found."; |
| 75 | + exit 1 |
| 76 | + fi |
| 77 | +
|
| 78 | + - name: Checking if there exists at least one build script |
| 79 | + run: | |
| 80 | + FILE=build.sh |
| 81 | + if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then |
| 82 | + echo "File "$FILE" was found."; |
| 83 | + exit 0 |
| 84 | + else |
| 85 | + echo "File "$FILE" was not found."; |
| 86 | + exit 1 |
| 87 | + fi |
| 88 | +
|
| 89 | + - name: Checking if there exists at least one remote build script |
| 90 | + run: | |
| 91 | + FILE=rbuild.sh |
| 92 | + if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then |
| 93 | + echo "File "$FILE" was found."; |
| 94 | + exit 0 |
| 95 | + else |
| 96 | + echo "File "$FILE" was not found."; |
| 97 | + exit 1 |
| 98 | + fi |
| 99 | +
|
| 100 | + - name: Checking if there exists at least one test script |
| 101 | + run: | |
| 102 | + FILE=test.sh |
| 103 | + if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then |
| 104 | + echo "File "$FILE" was found."; |
| 105 | + exit 0 |
| 106 | + else |
| 107 | + echo "File "$FILE" was not found."; |
| 108 | + exit 1 |
| 109 | + fi |
0 commit comments